Hi Muhamed,
In the best situation, by simply casting your data to a GPU, the code following the data creation will run, so long as all of the functions are overloaded for GPU arrays. For example
a = rand(10);
b = fft(a);
a = gpuArray.rand(10);
b = fft(a);
In the example you've highlited, the code should run fine by just making the following change
[gx, gy] = meshgrid( gpuArray.colon( -1, 1/N2, (N2-1)/N2 ) );
to
[gx, gy] = meshgrid( colon( -1, 1/N2, (N2-1)/N2 ) );
or what would be more common coded as
[gx, gy] = meshgrid(-1:1/N2:(N2-1)/N2);
0 Comments
Sign in to comment.