I'm little newbie whit OpenCl and i wanna try the following, using ClMagma and opencl kernel:
cl_mem A_k, B_k;
magma_malloc(&A_k, col*row*sizeof(double));
magma_malloc(&B_k, col*row*sizeof(double));
magma_dgemm(MagmaNoTrans, MagmaTrans, row, row, col, alpha, A_k, size, row, A_k, size, row, beta, B_k, size, row, queue);
And them i want use A_k and B_k inside a OpenCl kernel, but if i use something like:
status = clSetKernelArg(k_test, 0, sizeof(cl_mem), &A_k);
I receive a "CL_INVALID_MEM_OBJECT" so how i can use A_k array inside OpenCl kernel whitout moving it to Host and then to Device again (making new array with clCreateBuffer).
Alredy tried "clEnqueueCopyBuffer" and didn't work
Any help will be much apreciated, Thx!