1 2 3 4 5 6 7 8 9 10 11 12 13 14
//-*-c-*- #include "rotate.h" extern "C" { __global__ void rotate(float3 *a, float *phi, float3 *n, float3 *dest) { int idx = blockIdx.x*blockDim.x + threadIdx.x; dest[idx] = rotate(a[idx], phi[idx], n[idx]); } } // extern "c"