Function Naming
- Huawei-developed KVSIP functions:
Function names must comply with the general format: [KVSIP]_<name>_<datatype>(<parameters>)
- Open source VSIP signal functions:
Function names must comply with the general format: [vsip]_<name>_<datatype>(<parameters>)
Example: void (vsip_cvdiv_f)(const vsip_cvview_f *a, const vsip_cvview_f *b, const vsip_cvview_f *r);
In the preceding example:
- vsip is the prefix, indicating the signal library.
- cvdiv is a function name, indicating that the function implements a complex vector division operation.
- f indicates that the data type of all input parameters of the function is float.
- The parameters in the parentheses are input through the interface.
Function Name <name>
The name of a function indicates what the function does. Format: <name>=[modifier]<operation>
[modifier] usually consists of the abbreviation of the data type to be processed, and <operation> usually consists of one or more words, acronyms, and abbreviations that describe the operation.
Table 1 lists the data types and their abbreviations.
Data Type <datatype>
The <datatype> element indicates the data type to be processed by the function, which is usually the data type of the function parameters. For details about data types used in the VSIP, see Basic Data Types.
For example, vsip_cvdiv_f performs a division operation between two source vectors of the 32-bit floating-point complex type, and stores the result in a target vector of the 32-bit floating-point complex type.
Parameters <parameters>
The <parameters> element specifies all parameters of a function.
The parameters are arranged in the following sequence:
- Source operand, which is usually an object pointer of a scalar, vector, or matrix structure.
- Destination operand