]> foleosoft.com Git - QAnsel.git/commitdiff
Thu Mar 7 08:15:09 PM EST 2024
authormiha-q <>
Fri, 8 Mar 2024 01:15:09 +0000 (20:15 -0500)
committermiha-q <>
Fri, 8 Mar 2024 01:15:09 +0000 (20:15 -0500)
src/complex.c

index dbef3bdc850856a1c0e0ad7601224c1f40bd6021..c83e8a656e4fef8e17d9623a7b29fe7a17b926c3 100644 (file)
@@ -8,7 +8,6 @@
 #include "cores.c"
 #include "kernel_cpu.cl"
 #include "kernel_gpu.cl"
-#define OPTIMAL_WGS_KNK 3
 typedef struct
 {
     float real, imaginary;
@@ -557,8 +556,7 @@ void cpx_mtx_dot_metal(float* ptrR, float* ptrA, float* ptrB, int rowsA, int col
        err = clSetKernelArg(kernel, 5, sizeof(int), &rowsB); gpuerr(err);
        err = clSetKernelArg(kernel, 6, sizeof(int), &colsB); gpuerr(err);
 
-       size_t wgs[2] = {1, 1};
-       err = clEnqueueNDRangeKernel(cpx_mtx_command_queue, kernel, 2, NULL, (size_t[]){rowsR, colsR}, wgs, 0, NULL, NULL);
+       err = clEnqueueNDRangeKernel(cpx_mtx_command_queue, kernel, 2, NULL, (size_t[]){rowsR, colsR}, NULL, 0, NULL, NULL);
        gpuerr(err);
 
        //Wait for completion
@@ -753,8 +751,7 @@ void cpx_mtx_knk_metal_2x2(float* ptrR, float* ptrA, float* ptrB, int rowsA, int
        err = clSetKernelArg(kernel,11, sizeof(float), &gate7); gpuerr(err);
 
        //Run the program
-       size_t wgs[] = {OPTIMAL_WGS_KNK};
-       err = clEnqueueNDRangeKernel(cpx_mtx_command_queue, kernel, 1, NULL, (size_t[]){rowsR / 2}, wgs, 0, NULL, NULL);
+       err = clEnqueueNDRangeKernel(cpx_mtx_command_queue, kernel, 1, NULL, (size_t[]){rowsR / 2}, (size_t[]){2}, 0, NULL, NULL);
        gpuerr(err);
 
        //Wait for completion