From: miha-q <> Date: Mon, 20 Jan 2025 03:19:34 +0000 (-0500) Subject: Sun Jan 19 10:19:34 PM EST 2025 X-Git-Url: http://www.foleosoft.com/?a=commitdiff_plain;h=752663ab4f1e92337cd1710e2c0583e6e0f8da51;p=QAnsel.git Sun Jan 19 10:19:34 PM EST 2025 --- diff --git a/src/kernel.c b/src/kernel.c index a767fa2..ef20d71 100644 --- a/src/kernel.c +++ b/src/kernel.c @@ -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,