I’m doing a simulation on Matlab. I wrote a kernel code on cuda and try to run in matlab. My code is like that :
% Preparation of Kernel
Kernel = parallel.gpu.CUDAKernel(‘example.ptx’,‘example.cu’);
Kernel.ThreadBlockSize=[64 2 1];
h_Array _Input = (reshape (single (samples),1,size));
d_In=gpuArray (h_Array _Input);
This code is working. But I want to divide size by 2 and calculate with 2 kernel at same time becausee I have 2 gpu cores. When I generate second kernel, I lose datas of first one.
How can I run two gpu at same time?