diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2024-10-28 11:09:12 -0400 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2024-10-28 11:09:12 -0400 |
| commit | 93a3f005480effe48513e7bc81161db1adc43f32 (patch) | |
| tree | 64eeca36d8fc5c26663212db9210bc86d63dcd52 /balls.cl | |
| parent | 613c6f7390cfc85a440b8aef3ec6e9d88529e526 (diff) | |
| download | balls-93a3f005480effe48513e7bc81161db1adc43f32.zip | |
move
Diffstat (limited to 'balls.cl')
| -rw-r--r-- | balls.cl | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1,6 +1,14 @@ #define RADIUS 0.15f __kernel void +move(__global float2 *positions, __global float2 *velocities) { + size_t id; + + id = get_global_id(0); + positions[id] += velocities[id]; +} + +__kernel void genVertices(__global float2 *positions, __global float2 *vertices) { size_t ball, nsegs; float2 center; |