summaryrefslogtreecommitdiff
path: root/tests/rotate_test.cu
diff options
context:
space:
mode:
authorAnthony LaTorre <telatorre@gmail.com>2011-05-06 12:06:58 -0400
committerAnthony LaTorre <telatorre@gmail.com>2011-05-06 12:06:58 -0400
commit4e2720ff56afff978acaf589218cee0122d2ae29 (patch)
tree98be56318474b5d87c3514bd97bb4ae5b33f0d1b /tests/rotate_test.cu
parent98dc8b3d4eb46fdb73b01e78c5e53ff3a779ab85 (diff)
downloadchroma-4e2720ff56afff978acaf589218cee0122d2ae29.tar.gz
chroma-4e2720ff56afff978acaf589218cee0122d2ae29.tar.bz2
chroma-4e2720ff56afff978acaf589218cee0122d2ae29.zip
added rotations
Diffstat (limited to 'tests/rotate_test.cu')
-rw-r--r--tests/rotate_test.cu14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/rotate_test.cu b/tests/rotate_test.cu
new file mode 100644
index 0000000..96e4d75
--- /dev/null
+++ b/tests/rotate_test.cu
@@ -0,0 +1,14 @@
+//-*-c-*-
+
+
+
+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"