From: miha-q <> Date: Sun, 3 Mar 2024 05:33:59 +0000 (-0500) Subject: Sun Mar 3 12:33:59 AM EST 2024 X-Git-Url: http://www.foleosoft.com/?a=commitdiff_plain;h=f195f7b994e271c83a934f464dfb5325319b5d13;p=QAnsel.git Sun Mar 3 12:33:59 AM EST 2024 --- diff --git a/src/QAnsel.c b/src/QAnsel.c index 8801aeb..e1e18e4 100644 --- a/src/QAnsel.c +++ b/src/QAnsel.c @@ -16,8 +16,8 @@ uint8_t USE_GPU = 0; #define CL_USE_DEPRECATED_OPENCL_1_2_APIS #define CL_TARGET_OPENCL_VERSION 120 #include -#include "gpu/gpu.c" - +//#include "gpu/gpu.c" +#include "gpu/gpu_test.c" #endif typedef struct diff --git a/src/gpu/gpu_test.c b/src/gpu/gpu_test.c index 6b14609..f79ae1d 100644 --- a/src/gpu/gpu_test.c +++ b/src/gpu/gpu_test.c @@ -1,9 +1,8 @@ //This is for testing GPU functions on the CPU #define __kernel #define __global -#include "gpu/gpu_mmul.cl" int GPU_GLOBAL_ID_0, GPU_GLOBAL_ID_1, GPU_GLOBAL_ID_2; -int get_global_int(int id) +int get_global_id(int id) { switch (id) { @@ -12,8 +11,9 @@ int get_global_int(int id) case 2: return GPU_GLOBAL_ID_2; } } +#include "gpu_mmul.cl" -void GPU_mmul_test(float* ptrR, float* ptrA, float* ptrB, size_t rowsA, size_t colsB, size_t shared) +void GPU_mmul(float* ptrR, float* ptrA, float* ptrB, size_t rowsA, size_t colsB, size_t shared) { for (int i = 0; i < rowsA; i++) { @@ -24,4 +24,12 @@ void GPU_mmul_test(float* ptrR, float* ptrA, float* ptrB, size_t rowsA, size_t c gpu_mmul(ptrR, ptrA, ptrB, rowsA, colsB, shared); } } -} \ No newline at end of file +} + + +uint8_t GPU_init() +{ + return 1; +} + +void GPU_clean() {}