https://github.com/cpplawyer/cudavector
Vector Datastructure for Nvidia Cuda Devices. Optimized all memory is allocated on Cuda Device for optimal use. Usable in device code maintainer of cudacpp Library
https://github.com/cpplawyer/cudavector
Last synced: 11 months ago
JSON representation
Vector Datastructure for Nvidia Cuda Devices. Optimized all memory is allocated on Cuda Device for optimal use. Usable in device code maintainer of cudacpp Library
- Host: GitHub
- URL: https://github.com/cpplawyer/cudavector
- Owner: cppLawyer
- License: gpl-3.0
- Created: 2022-06-06T10:48:50.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-12T21:52:42.000Z (over 3 years ago)
- Last Synced: 2025-01-14T01:10:38.139Z (about 1 year ago)
- Language: Cuda
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cudaVector
- Vector 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:
```
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include
#include "cudaVector.cuh"
__global__ void do_something() {
cudacpp::cudaVector var;
var.push_back(1);
var.push_back(2);
var.push_back(3);
var.push_back(4);
var.push_back(5);
var.erase(var.begin() + 3, var.end() - 1);
printf("%i\n\n\n", var.size());
for (uint_fast64_t i = 0; i < var.size(); ++i)
printf("%i\n", var[i]);
var.insert(var.begin(), 99);
printf("%i\n", var.at(0));
printf("%i\n", var.at(3));
}
int main()
{
do_something << < 1, 1 >> > ();
return 0;
}
```