Undefined function or variable 'optIdx'. Error in sh (line 28) dev = gpuDevice( optIdx )? what is this

1 view (last 30 days)
if dev = parallel.gpu.GPUDevice.select( optIdx );
else
dev = parallel.gpu.GPUDevice.current();
end
throw(E); % Strip off the stack.
end

Answers (1)

Joss Knight
Joss Knight on 5 Nov 2018
Edited: Joss Knight on 7 Nov 2018
Sorry if this seems like a facetious answer - I may be missing the point. The error means you haven't defined the variable optIdx.
Ah, wait a minute, I'm just getting up to speed. You're displaying the contents of the function gpuDevice there aren't you? I'd have to know how you called gpuDevice to know how that went wrong.

Categories

Find more on Matrices and Arrays in Help Center and File Exchange

Tags

Products


Release

R2015a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!