put all kernel opencl funcs in src

This commit is contained in:
2024-01-24 19:02:16 +01:00
parent 4bf32c6501
commit b83a125bac
2 changed files with 57 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
__kernel void prodTensorLin_TYPE_FLOAT(long unsigned int M1rank, __global const float *M0x , __global const float *M1x, __global float *Mx ){
//Get the index of the current element to be processed
size_t k = get_global_id(0);
size_t i = k / M1rank;
size_t j = k % M1rank;
Mx[k] = M0x[i] * M1x[j];
}
__kernel void prodTensorLin_TYPE_DOUBLE(long unsigned int M1rank, __global const double *M0x , __global const double *M1x, __global double *Mx ){
//Get the index of the current element to be processed
size_t k = get_global_id(0);
size_t i = k / M1rank;
size_t j = k % M1rank;
Mx[k] = M0x[i] * M1x[j];
}