add endian option in cl tensor functions

This commit is contained in:
2024-02-02 23:13:22 +01:00
parent 70b1177e5f
commit 7dd749f85e
5 changed files with 127 additions and 6 deletions
+19
View File
@@ -16,6 +16,25 @@ __kernel void prodTensorLin_TYPE_DOUBLE(long unsigned int M1rank, __global const
Mx[k] = M0x[i] * M1x[j];
}
__kernel void prodTensorLinNotEndian_TYPE_FLOAT(long unsigned int M0rank, __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 % M0rank;
size_t j = k / M0rank;
Mx[k] = M0x[i] * M1x[j];
}
__kernel void prodTensorLinNotEndian_TYPE_DOUBLE(long unsigned int M0rank, __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 % M0rank;
size_t j = k / M0rank;
Mx[k] = M0x[i] * M1x[j];
}