Conditions for Code Replacement of Math Functions with QHL
Each math function that can be used with the 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 functions only when you set specific properties, as indicated in this table:
Function | Input Requirements | Parameter Requirements | Equivalent Functions | |
---|---|---|---|---|
1 | sin |
|
| |
2 | cos |
|
| |
3 | abs |
| Input Length > 11 |
|
4 | sqrt |
|
| |
5 | rsqrt (Fixed-Point Designer) |
|
| |
6 | log |
|
| |
7 | log2 |
|
| |
8 | log10 |
|
| |
9 | asin |
|
| |
10 | acos |
|
| |
11 | atan |
|
| |
12 | sinh |
|
| |
13 | cosh |
|
| |
14 | tanh |
|
| |
15 | exp |
|
| |
16 | power |
|
|
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 Operators 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