aboutsummaryrefslogtreecommitdiff
path: root/kernel.cl
diff options
context:
space:
mode:
Diffstat (limited to 'kernel.cl')
-rw-r--r--kernel.cl7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel.cl b/kernel.cl
index 0a8056b..ad984bb 100644
--- a/kernel.cl
+++ b/kernel.cl
@@ -147,3 +147,10 @@ __kernel void evolve(__global vec_t* pos_a,
vel_b[i] = v;
}
}
+
+__kernel void get_velocity_norms(__global vec_t* velocities, __global scalar_t* norms)
+{
+ unsigned int i = get_global_id(0);
+
+ norms[i] = length(velocities[i]);
+}