]> foleosoft.com Git - QAnsel.git/commitdiff
Sun Jan 19 10:19:34 PM EST 2025
authormiha-q <>
Mon, 20 Jan 2025 03:19:34 +0000 (22:19 -0500)
committermiha-q <>
Mon, 20 Jan 2025 03:19:34 +0000 (22:19 -0500)
src/kernel.c

index a767fa296f05afd0ff72c50642bec1ccbb1651d6..ef20d71c742569c2e499e10ae6215934a88f3735 100644 (file)
@@ -1,10 +1,14 @@
 #include "kernel.h" //{cpu_only}}
 
-__kernel void kernel_dot
+__kernel //{gpu_only}
+void kernel_dot
 (
-    __global float* ptrR,
-    __global float* ptrA,
-    __global float* ptrB,
+    __global //{gpu_only}
+       float* ptrR,
+    __global //{gpu_only}
+       float* ptrA,
+    __global //{gpu_only}
+       float* ptrB,
     const int rowsA,
     const int colsA,
     const int rowsB,
@@ -19,7 +23,7 @@ __kernel void kernel_dot
     const int colR = get_global_id(1); //{gpu_only}
     const int rowR = get_global_id_0; //{cpu_only}
     const int colR = get_global_id_1; //{cpu_only}
-    
+
     float rR = 0;
     float iR = 0;
 
@@ -43,11 +47,15 @@ __kernel void kernel_dot
     ptrR[(size_t)rowR * ((size_t)colsR * (size_t)2) + ((size_t)colR * (size_t)2) + (size_t)1] = iR;
 }
 
-__kernel void kernel_knk
+__kernel //{gpu_only}
+void kernel_knk
 (
-    __global float* ptrR,
-    __global float* ptrA,
-    __global float* ptrB,
+    __global //{gpu_only}
+       float* ptrR,
+    __global //{gpu_only}
+       float* ptrA,
+    __global //{gpu_only}
+       float* ptrB,
     const int rowsA,
     const int colsA,
     const int rowsB,
@@ -84,10 +92,13 @@ __kernel void kernel_knk
     }
 }
 
-__kernel void kernel_knk_2x2
+__kernel //{gpu_only}
+void kernel_knk_2x2
 (
-    __global float* ptrR,
-    __global float* ptrA,
+    __global //{gpu_only}
+       float* ptrR,
+    __global //{gpu_only}
+       float* ptrA,
     const int rowsA,
     const int colsA,
     const float gate0,