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

https://github.com/cpplawyer/cudaqueue

Queue Datastructure for Nvidia Cuda Devices. Optimized all memory is allocated on Nvidia Cuda Device for optimal use. Usable in device code
https://github.com/cpplawyer/cudaqueue

Last synced: 11 months ago
JSON representation

Queue Datastructure for Nvidia Cuda Devices. Optimized all memory is allocated on Nvidia Cuda Device for optimal use. Usable in device code

Awesome Lists containing this project

README

          

# cudaQueue

- Queue Datastructure for Nvidia Cuda Devices.
- Optimized all memory is allocated on Cuda Device for optimal use.
- Usable in device code
- maintainer of cudacpp Library

EXAMPLE:
```

template
__device__ inline void print(cudacpp::cudaQueue& value) {
int size = value.size();
for (int var = 0; var < size; ++var) {
printf("%i\n", value.front());
value.pop();
}
}

__device__ inline void fillQueue() {
cudacpp::cudaQueue var;
for (int i = 0; i < 15; ++i) {
var.push(i * 14 + 1);
}
print(var);
}

__global__ void do_something() {
fillQueue();
}

int main()
{
do_something <<< 1, 1 >>> ();
cudaDeviceSynchronize();
cudaDeviceReset();
}

```