Main Content

coder.BLASCallback.useEnumNameRatherThanTypedef

Class: coder.BLASCallback
Namespace: coder

Specify whether types for enumerations in a BLAS library include the enum keyword

Syntax

p = coder.BLASCallback.useEnumNameRatherThanTypedef()

Description

p = coder.BLASCallback.useEnumNameRatherThanTypedef() returns true if types for enumerations in your BLAS library include the enum keyword. Otherwise it returns false.

coder.BLASCallback is an abstract class for defining a BLAS callback class. A BLAS callback class specifies the BLAS library and CBLAS header and data type information to use for BLAS calls in code generated from MATLAB® code. At code generation time, if you specify a BLAS callback class, for certain vector and matrix function calls, the code generator produces BLAS calls in standalone code.

By default, the callback class that you define inherits the useEnumNameRatherThanTypedef method from coder.BLASCallback and returns false. If types for enumerations in your BLAS library include the enum keyword, you must override the inherited useEnumNameRatherThanTypedef method with your own implementation in your callback class definition. In such cases, the useEnumNameRatherThanTypedef method must return true.

The generated code uses the output of useEnumNameRatherThanTypedef to specify types of variables in the generated code that produces BLAS calls.

Output Arguments

expand all

Logical variable that is true if types for enumerations in the BLAS library include the enum keyword, otherwise it is false.

Attributes

Statictrue

To learn about attributes of methods, see Method Attributes.

Examples

expand all

If types for enumerations in your BLAS library use the enum keyword, you must include this Static method in your callback class definition.

function p = useEnumNameRatherThanTypedef()
p = true;
end

Version History

Introduced in R2018b