MATLAB: Removing FOR loop to solve Ax=B on multidimensional arrays on GPU

gpumldividen-d arrays

Hi,
my code looks this way now(Its an example code i wrote):
A=gpuArray(rand([1000 1000 1000]));
B=gpuArray(rand([1000 1 1000]));
for kk=1:1000
C(:,kk)=A(:,:,kk)\B(:,kk);
end
Assume that A,B,C matrices are GPU matrices. Is it possible to remove FOR loop and perform same operation as above lines on GPU using GPU matrices?.(Assume that i do not want to use 'while' or 'if' or any other loops )
The closest i could find was on fileexchange . However she/he does not talk about 'A\B' kind of operations. Also she/he does not talk about GPU computing.
Thank you.

Best Answer

C=pagefun(@mldivide,A,B)
Related Question