#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
//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)
{
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++)
{
gpu_mmul(ptrR, ptrA, ptrB, rowsA, colsB, shared);
}
}
-}
\ No newline at end of file
+}
+
+
+uint8_t GPU_init()
+{
+ return 1;
+}
+
+void GPU_clean() {}