Conditions for Code Replacement of Math Operators with QHL
Each math operator that can be used with the Embedded Coder® Support Package for Qualcomm® Hexagon® Processors requires specific conditions to allow code replacement by using the Qualcomm Hexagon Library (QHL). You use this code replacement when generating C/C++ code from a model or from MATLAB® code.
If you do not meet the specific requirements, then the generated C/C++ code runs on the Qualcomm Hexagon Processors. However, this generated code does not use library support.
Float Data Type
The library supports these math operators for Float data type input only when you set specific properties, as indicated in this table:
Operators | Float Input Requirements | Float Parameter Requirements | Equivalent Functions |
---|---|---|---|
Addition (+) |
|
|
|
Subtraction (-) |
|
|
|
Element-wise matrix multiplication |
|
|
|
Multiplication - scaling |
|
|
|
Matrix inverse |
|
| |
Comparators |
|
Real Input Length >= 20 OR Complex Input Length > inf
Real Input Length > = 16 OR Complex Input Length > inf
Real Input Length > 16
Real Input Length > 16 |
|
Shift |
|
|
|
Dot Product |
|
|
|
Fixed-point Q15 Data Types
The library supports these math operators for Fixed-point Q15 data types only when you set specific properties, as indicated in this table:
Operators | Fixed-point Q15 Input Requirements | Fixed-point Q15 Parameter Requirements | Equivalent Functions |
---|---|---|---|
Addition (+) |
|
|
|
Subtraction (-) |
|
|
|
Element-wise matrix multiplication |
|
|
|
Multiplication - Scaling |
|
|
|
Matrix inverse |
|
| |
Comparators |
|
Real Input Length >= 20 OR Complex Input Length > inf
Real Input Length > = 16 OR Complex Input Length > inf
Real Input Length > 16
Real Input Length > 16 |
|
Shift |
|
|
|
Dot Product |
|
|
|
See Also
Conditions for Code Replacement of DSP Blocks with QHL | Conditions for Code Replacement of DSP System Objects with QHL | Conditions for Code Replacement of Math Functions with QHL | Conditions for Code Replacement of DSP Blocks with HVX | Conditions for Code Replacement of DSP System Objects with HVX | Conditions for Code Replacement of Math Operators with HVX