This function causes a queue to wait until all the provided events have completed before running any future scheduled work.
12 lines
240 B
C
12 lines
240 B
C
#include <gpuintrin.h>
|
|
#include <stdint.h>
|
|
|
|
__gpu_kernel void sequence(uint32_t idx, uint32_t *inout) {
|
|
if (idx == 0)
|
|
inout[idx] = 0;
|
|
else if (idx == 1)
|
|
inout[idx] = 1;
|
|
else
|
|
inout[idx] = inout[idx - 1] + inout[idx - 2];
|
|
}
|