Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/0xhilsa/vector-cuda

vector calculation with GPU acceleration using CUDA
https://github.com/0xhilsa/vector-cuda

c cpp11 cuda cuda-kernels cuda-programming nvcc

Last synced: 5 days ago
JSON representation

vector calculation with GPU acceleration using CUDA

Awesome Lists containing this project

README

        

# Vector calculation in C++ with GPU acceleration using CUDA

## Requirements
- GPU (obvious)
- nvcc compiler
- C++/C compiler

```cu
#include
#include
using namespace std;

int main(){
Vector vec1(1,2,3);
Vector vec2(2,3,4);

Vector add = vec1.add(vec2);
Vector sub = vec1.sub(vec2);

add.print();
sub.print();
}
```

```bash
vector: (3, 5, 7)
vector: (-1, -1, -1)
```