Skip to content

Perform vector/array operations on GPU without the complexities of CUDA coding. All operations are performed on GPU which takes advantage of parallel processing.

Notifications You must be signed in to change notification settings

shreyanshsaha/CudaVector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CudaVector

Requirements

  1. CUDA Toolkit

In linux execute the following to install:

sudo apt install nvidia-cuda-toolkit

Compiling

If you are importing this library in your code, compile your code using nvcc.

Sample:

nvcc myprogram.cpp -o output.exe

Supported operations

  1. Vector Addition
  2. Vector Substraction
  3. Vector dot product
  4. Multiplication with constantt
  5. Division with constant

Example usage

// Two vectors of size 10
CudaVector<int> a(10);
CudaVector<int> b(10);

CudaVector<int> c = a + b;

for(int i=0; i<c.size(); i++)
  std::cout<<c[i]<<", ";
cout<<std::endl;

About

Perform vector/array operations on GPU without the complexities of CUDA coding. All operations are performed on GPU which takes advantage of parallel processing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published