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

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

Réponses (1)

Joss Knight
Joss Knight le 5 Nov 2018
Modifié(e) : Joss Knight le 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.

Catégories

En savoir plus sur Programming dans Centre d'aide et File Exchange

Produits

Version

R2015a

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by