summaryrefslogtreecommitdiff
path: root/tests/linalg_test.cu
diff options
context:
space:
mode:
Diffstat (limited to 'tests/linalg_test.cu')
-rw-r--r--tests/linalg_test.cu16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/linalg_test.cu b/tests/linalg_test.cu
index bce5ea6..b61488f 100644
--- a/tests/linalg_test.cu
+++ b/tests/linalg_test.cu
@@ -99,16 +99,28 @@ __global__ void floatdivfloat3(float3 *a, float c, float3 *dest)
dest[idx] = c/a[idx];
}
-__global__ void dot(float3 *a, float3 *b, float* dest)
+__global__ void dot(float3 *a, float3 *b, float *dest)
{
int idx = blockIdx.x*blockDim.x + threadIdx.x;
dest[idx] = dot(a[idx],b[idx]);
}
-__global__ void cross(float3 *a, float3 *b, float3* dest)
+__global__ void cross(float3 *a, float3 *b, float3 *dest)
{
int idx = blockIdx.x*blockDim.x + threadIdx.x;
dest[idx] = cross(a[idx],b[idx]);
}
+__global__ void norm(float3 *a, float *dest)
+{
+ int idx = blockIdx.x*blockDim.x + threadIdx.x;
+ dest[idx] = norm(a[idx]);
+}
+
+__global__ void minusfloat3(float3 *a, float3 *dest)
+{
+ int idx = blockIdx.x*blockDim.x + threadIdx.x;
+ dest[idx] = -a[idx];
+}
+
} // extern "c"