Fixed bug in opencl version of matrix creation

This commit is contained in:
2026-02-14 15:22:52 -06:00
parent 73ae0e66d1
commit 275f48fe0e
2 changed files with 3 additions and 2 deletions

View File

@@ -14,7 +14,7 @@ __kernel void EuclideanDistance(__global unsigned const char *imgs,
__local unsigned int partial[256];
for (int i = gid; i < imsize; i += groupSize) {
for (int i = lid; i < imsize; i += groupSize) {
int d = (int)imgs[img1Offset + i] - (int)imgs[img2Offset + i];
sum += (unsigned int)(d * d);
}