12345678910111213141516171819202122232425262728293031323334 |
- #include <starpu.h>
- #include <starpu_cuda.h>
- static __global__ void cuda_variable(float * tab)
- {
- *tab += 1.0f;
- return;
- }
- extern "C" void cuda_codelet(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
- {
- float *val = (float *)STARPU_VARIABLE_GET_PTR(descr[0]);
- cuda_variable<<<1,1, 0, starpu_cuda_get_local_stream()>>>(val);
- cudaStreamSynchronize(starpu_cuda_get_local_stream());
- }
|