MATLAB: How gpuArray.randperm is implemented randperm I looked in to the docs but it doesn't have any reference to the algorithm. Thank you. Best Answer randperm calls [~,p] = sort(rand(1,N))but obviously does everything on the GPU. Related SolutionsMATLAB: What algorithm is matlab using to create randn numbers https://www.mathworks.com/matlabcentral/answers/97811-what-is-the-algorithm-used-by-the-normally-distributed-pseudorandom-number-generator-randn-in-matlab MATLAB: How to construct a complex gpuArray directly on the GPU None of MATLAB's build methods (the zeros, ones family) build complex arrays, so the nearest you can get is to do something like:complex(zeros(3, 'gpuArray'))which never allocates any host memory, and results in a complex gpuArray. Related QuestionRandperm and sorting arrayGenerate real random numbersGetting gpuArray output type not currently implemented
Best Answer