Undefined function or variable 'optIdx'. Error in sh (line 28) dev = gpuDevice( optIdx )? what is this
Afficher commentaires plus anciens
if dev = parallel.gpu.GPUDevice.select( optIdx );
else
dev = parallel.gpu.GPUDevice.current();
end
throw(E); % Strip off the stack.
end
1 commentaire
Walter Roberson
le 8 Nov 2018
That code appears incomplete. You cannot have a = inside an if statement.
Réponses (1)
Joss Knight
le 5 Nov 2018
Modifié(e) : Joss Knight
le 7 Nov 2018
0 votes
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
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!