Conditions for Code Replacement of Math Operators with QHL
R2026bEach math operators 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.
The library supports these math operators for floating-point 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 |
| - |
|
| Conjugate |
| - |
|
| 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 |
|
| Dot product |
|
|
|
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 | Input DataType | Fixed-point Q15 Parameter Requirements | Equivalent Functions |
|---|---|---|---|---|
| Addition (+) |
|
|
|
|
| Subtraction (-) |
|
|
|
|
| Element-wise matrix multiplication |
|
|
|
|
| Multiplication - scaling |
|
|
|
|
The library supports these integer operations for fixed-point Q15 data types only when you set specific properties, as indicated in this table.
| Operators | Fixed-point Q15 Input Requirements | Input DataType | Fixed-point Q15 Parameter Requirements | Equivalent Functions |
|---|---|---|---|---|
| Shift |
|
|
|
|
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