Add 'smemcoherence' kernel

This commit is contained in:
Hansung Kim
2024-01-02 20:28:40 -08:00
parent edb385f138
commit a5c50b60c8
12 changed files with 562 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
__kernel void flops (__global volatile const float *src,
__global volatile float *dst,
__local volatile float *smem)
{
int gid = get_global_id(0);
float f = 0.0f;
float incr = src[0];
__attribute__((opencl_unroll_hint))
for (int i = 0; i < 5000; i++) {
f += incr;
}
dst[gid] = f;
}