From 6c17984d6ad7e0873374e5d1e508247dc909bf89 Mon Sep 17 00:00:00 2001 From: amarmemic Date: Sun, 23 Oct 2022 19:14:35 +0200 Subject: [PATCH] fix opencl kernel, see cpu implementation (last instructio) --- .../src/hello_gpgpu/benchmark/correlation/correlation.cl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/repos/hello_gpgpu/src/hello_gpgpu/benchmark/correlation/correlation.cl b/repos/hello_gpgpu/src/hello_gpgpu/benchmark/correlation/correlation.cl index fa933ad34e..9f99fff84b 100644 --- a/repos/hello_gpgpu/src/hello_gpgpu/benchmark/correlation/correlation.cl +++ b/repos/hello_gpgpu/src/hello_gpgpu/benchmark/correlation/correlation.cl @@ -86,8 +86,12 @@ __kernel void corr_kernel(__global DATA_TYPE *symmat, __global DATA_TYPE *data, { symmat[j1*m + j2] += data[i*m + j1] * data[i*m + j2]; } + symmat[j2*m + j1] = symmat[j1*m + j2]; } + }else + { + symmat[(m-1)*m + (m-1)] = 1.0; } }