target.FloatingPointDataType Class
Namespace: target
Describe floating point data type implemented by compiler for target hardware
Since R2021b
Description
Use a target.FloatingPointDataType
object to describe a floating point
data type that is implemented by the target hardware compiler but is not specified by a C
language standard.
To create a target.FloatingPointDataType
object, use the target.create
function.
The target.FloatingPointDataType
class is a handle
class.
Properties
Size
— Size in bits
0 (default) | integer
Size of the data type, specified in bits.
Attributes:
GetAccess | public |
SetAccess | public |
TypeName
— Data type name
character vector | string scalar
Name of floating point data type.
Attributes:
GetAccess | public |
SetAccess | public |
LiteralSuffix
— Numeric literal suffix
character vector | string scalar
Describe the suffix appended to numeric literal in C or C++ code, which indicates
data type. For example, some ARM® compilers support the use of the literal suffix f16
for
the _Float16
data type, which allows the specification of literals of
the data type in C or C++ code, say, 1.23f16
.
Attributes:
GetAccess | public |
SetAccess | public |
Includes
— Required C/C++ header files
cell of character vectors | string array
For the data type, specify the include files that are required in the C or C++ translation unit.
Attributes:
GetAccess | public |
SetAccess | public |
SystemIncludes
— Required C/C++ system header files
cell of character vectors | string array
For the data type, specify the system include files that are required in the C or C++ translation unit.
Attributes:
GetAccess | public |
SetAccess | public |
Name
— Identifier
string scalar
Identifier for data type description.
Attributes:
GetAccess | public |
SetAccess | public |
Examples
Specify Half-Precision ARM Data Type
Specify a 16-bit floating point ARM data type.
languageImplementation = target.create('LanguageImplementation', ... 'Name', 'ARM with half', ... 'Copy', 'ARM Compatible-ARM Cortex'); customHalf = target.create('FloatingPointDataType', ... 'Name', 'ARM Half Float', ... 'TypeName', '_Float16', ... 'LiteralSuffix', 'f16', ... 'Size', 16, ... 'SystemIncludes', "arm_fp16.h"); languageImplementation.DataTypes.NonStandardDataTypes = [customHalf]; target.add(languageImplementation);
Version History
Introduced in R2021b
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)