coder.specifyAsGPU
Specify that value is a GPU input to an entry-point function for GPU code generation
Since R2023b
Description
coder.specifyAsGPU(
is primarily used to specify that value,className)value is a GPU input with an
underlying class of className for code generation. To learn more about
input-type specification using arguments blocks, see Use Function Argument Validation to Specify Entry-Point Input Types.
The coder.specifyAsGPU validator has three distinct behaviors:
In MATLAB® execution,
coder.specifyAsGPUthrows an error ifvalueis a GPU array with an underlying type that does not matchclassName. Alternatively, ifvalueis not a GPU array,coder.specifyAsGPUthrows an error if the type ofvaluedoes not matchclassName.During input-type specification using function argument validation,
coder.specifyAsGPUspecifies thatvalueis a GPU array with an underlying type ofclassName.During code generation,
coder.specifyAsGPUthrows an error if the type ofvaluedoes not matchclassName.
Examples
Input Arguments
Extended Capabilities
Version History
Introduced in R2023b
