diff options
author | Stan Seibert <stan@mtrr.org> | 2011-09-16 15:02:02 -0400 |
---|---|---|
committer | Stan Seibert <stan@mtrr.org> | 2011-09-16 15:02:02 -0400 |
commit | 142b3c3caff164deb9bc7b2848e58e52387723ff (patch) | |
tree | 417da3ad69a2756aff7a21dca4b08733d3e87afb /src/transform.cu | |
parent | 084dfd08b714faefaea77cb7dc04d2e93dc04b1d (diff) | |
download | chroma-142b3c3caff164deb9bc7b2848e58e52387723ff.tar.gz chroma-142b3c3caff164deb9bc7b2848e58e52387723ff.tar.bz2 chroma-142b3c3caff164deb9bc7b2848e58e52387723ff.zip |
Move CUDA source inside chroma package, rename tests directory to test
Diffstat (limited to 'src/transform.cu')
-rw-r--r-- | src/transform.cu | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/transform.cu b/src/transform.cu deleted file mode 100644 index 1f4405e..0000000 --- a/src/transform.cu +++ /dev/null @@ -1,51 +0,0 @@ -//-*-c-*- - -#include "linalg.h" -#include "rotate.h" - -extern "C" -{ - -/* Translate the points `a` by the vector `v` */ -__global__ void -translate(int nthreads, float3 *a, float3 v) -{ - int id = blockIdx.x*blockDim.x + threadIdx.x; - - if (id >= nthreads) - return; - - a[id] += v; -} - -/* Rotate the points `a` through an angle `phi` counter-clockwise about the - axis `axis` (when looking towards +infinity). */ -__global__ void -rotate(int nthreads, float3 *a, float phi, float3 axis) -{ - int id = blockIdx.x*blockDim.x + threadIdx.x; - - if (id >= nthreads) - return; - - a[id] = rotate(a[id], phi, axis); -} - -/* Rotate the points `a` through an angle `phi` counter-clockwise - (when looking towards +infinity along `axis`) about the axis defined - by the point `point` and the vector `axis` . */ -__global__ void -rotate_around_point(int nthreads, float3 *a, float phi, float3 axis, - float3 point) -{ - int id = blockIdx.x*blockDim.x + threadIdx.x; - - if (id >= nthreads) - return; - - a[id] -= point; - a[id] = rotate(a[id], phi, axis); - a[id] += point; -} - -} // extern "c" |