I took a matrix multiplication written using OpenCL from here:
src = "__kernel void
floatMatrixMult(__global float * MResp,
__global float * M1,
__global float * M2,
__global int * q)
{
// Vector element index
int i = get_global_id(0);
int j = get_global_id(1);
int p = get_global_size(0);
int r = get_global_size(1);
MResp[i + p * j] = 0;
int QQ = q[0];
for (int k = 0; k < QQ; k++)
{
MResp[i + p * j] += M1[i + p * k] * M2[k + QQ * j];
}
}";
then I used:
test = OpenCLFunctionLoad[{src}, "floatMatrixMult", {"Float", "Float", "Float", _Integer}, {8, 8}];
but I get this error:
OpenCLFunctionLoad::nofile: -- Message text not found -- (contents of
src
) >>
There isn't any documents to explain this. How can I resolve the issue? If the code itself has problem are there some other codes to do matrix multiplication using OpenCL?
OpenCLFunctionLoad
help page. Your call to it is completely wrong. $\endgroup$