]> foleosoft.com Git - QAnsel.git/commitdiff
Sun Mar 3 12:33:59 AM EST 2024
authormiha-q <>
Sun, 3 Mar 2024 05:33:59 +0000 (00:33 -0500)
committermiha-q <>
Sun, 3 Mar 2024 05:33:59 +0000 (00:33 -0500)
src/QAnsel.c
src/gpu/gpu_test.c

index 8801aeb109b99b1b33fac3a76f5cc8de63095682..e1e18e4a21b9a9fd47a5cd5d4c721f68f29a294b 100644 (file)
@@ -16,8 +16,8 @@ uint8_t USE_GPU = 0;
 #define CL_USE_DEPRECATED_OPENCL_1_2_APIS
 #define CL_TARGET_OPENCL_VERSION 120
 #include <CL/cl.h>
-#include "gpu/gpu.c"
-
+//#include "gpu/gpu.c"
+#include "gpu/gpu_test.c"
 #endif
 
 typedef struct
index 6b14609f80c6800c0d463b231e2fd00f14c4ace4..f79ae1d03f288461c9f38a6543773851184301ed 100644 (file)
@@ -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() {}