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
- Host: GitHub
- URL: https://github.com/cpplawyer/cudaqueue
- Owner: cppLawyer
- License: gpl-3.0
- Created: 2022-06-05T11:45:08.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-06T10:47:10.000Z (over 3 years ago)
- Last Synced: 2025-01-14T01:10:34.752Z (about 1 year ago)
- Language: Cuda
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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();
}
```