![]() |
MATHLIB User Guide
|
This module consists of definitions (macros, structures, utility functions) that are commonly applicable to all MATHLIB kernels.
File to hold buffer parameter related info for MATHLIB.
Data Structures | |
| struct | MATHLIB_bufParams1D_t |
| A structure for a 1 dimensional buffer descriptor. More... | |
| struct | MATHLIB_bufParams2D_t |
| A structure for a 2 dimensional buffer descriptor. More... | |
| struct | MATHLIB_bufParams3D_t |
| A structure for a 3 dimensional buffer descriptor. More... | |
| struct | MATHLIB_bufParamsND_t |
| A structure for a N dimensional buffer descriptor. More... | |
Functions | |
| static int32_t | MATHLIB_sizeof (uint32_t type) |
| Inline function returns number of bytes per element given a type of MATHLIB_data_type_e. More... | |
Typedefs | |
| typedef double | MATHLIB_D64 |
| Double precision floating point. More... | |
| typedef float | MATHLIB_F32 |
| Single precision floating point. More... | |
| typedef MATHLIB_STATUS_NAME | MATHLIB_STATUS |
| Return value for MATHLIB functions. More... | |
| typedef void * | MATHLIB_kernelHandle |
| Handle type for MATHLIB operations. More... | |
Macros | |
| #define | MATHLIB_ISSIGNED(type) ((type) < MATHLIB_UINT8 || (type) > MATHLIB_UINT128) |
| #define | MATHLIB_SIGNEDNESS(type) (MATHLIB_ISSIGNED((type)) ? "signed" : "unsigned") |
| #define | MATHLIB_PARAM_SIZE 128 |
| Parameter structure size in bytes. More... | |
| #define | MATHLIB_MMA_ACCUMULATOR_BYTE_WIDTH_8_BIT 4 |
| MMA accumulator width in bytes for 8 bit output data width. More... | |
| #define | MATHLIB_MMA_ACCUMULATOR_BYTE_WIDTH_16_BIT 8 |
| MMA accumulator width in bytes for 16 bit output data width. More... | |
| #define | MATHLIB_MMA_ACCUMULATOR_BYTE_WIDTH_32_BIT 16 |
| MMA accumulator width in bytes for 32 bit output data width. More... | |
| #define | MATHLIB_ALIGN_SHIFT_64BYTES 6 |
| Number of bits to shift for 64-byte memory alignment. More... | |
| #define | MATHLIB_ALIGN_SHIFT_128BYTES 7 |
| Number of bits to shift for 128-byte memory alignment. More... | |
| #define | MATHLIB_ALIGN_SHIFT_256BYTES 8 |
| Number of bits to shift for 256-byte memory alignment. More... | |
| #define | MATHLIB_ALIGN_64BYTES (1 << MATHLIB_ALIGN_SHIFT_64BYTES) |
| Align by 64-byte memory alignment. More... | |
| #define | MATHLIB_ALIGN_128BYTES (1 << MATHLIB_ALIGN_SHIFT_128BYTES) |
| Align by 128-byte memory alignment. More... | |
| #define | MATHLIB_ALIGN_256BYTES (1 << MATHLIB_ALIGN_SHIFT_256BYTES) |
| Align by 256-byte memory alignment. More... | |
| #define | MATHLIB_L2DATA_ALIGN_SHIFT MATHLIB_ALIGN_SHIFT_64BYTES |
| Set the default L2 data alignment. More... | |
| #define | MATHLIB_L2DATA_ALIGNMENT (((uint32_t)1) << ((uint32_t)MATHLIB_L2DATA_ALIGN_SHIFT)) |
| Macro that specifies the alignment of data buffers in L2 memory for optimal performance. More... | |
| #define MATHLIB_ISSIGNED | ( | type | ) | ((type) < MATHLIB_UINT8 || (type) > MATHLIB_UINT128) |
Definition at line 69 of file MATHLIB_bufParams.h.
| #define MATHLIB_SIGNEDNESS | ( | type | ) | (MATHLIB_ISSIGNED((type)) ? "signed" : "unsigned") |
Definition at line 70 of file MATHLIB_bufParams.h.
| #define MATHLIB_PARAM_SIZE 128 |
Parameter structure size in bytes.
Definition at line 220 of file MATHLIB_types.h.
| #define MATHLIB_MMA_ACCUMULATOR_BYTE_WIDTH_8_BIT 4 |
MMA accumulator width in bytes for 8 bit output data width.
Definition at line 222 of file MATHLIB_types.h.
| #define MATHLIB_MMA_ACCUMULATOR_BYTE_WIDTH_16_BIT 8 |
MMA accumulator width in bytes for 16 bit output data width.
Definition at line 223 of file MATHLIB_types.h.
| #define MATHLIB_MMA_ACCUMULATOR_BYTE_WIDTH_32_BIT 16 |
MMA accumulator width in bytes for 32 bit output data width.
Definition at line 224 of file MATHLIB_types.h.
| #define MATHLIB_ALIGN_SHIFT_64BYTES 6 |
Number of bits to shift for 64-byte memory alignment.
Definition at line 233 of file MATHLIB_types.h.
| #define MATHLIB_ALIGN_SHIFT_128BYTES 7 |
Number of bits to shift for 128-byte memory alignment.
Definition at line 235 of file MATHLIB_types.h.
| #define MATHLIB_ALIGN_SHIFT_256BYTES 8 |
Number of bits to shift for 256-byte memory alignment.
Definition at line 237 of file MATHLIB_types.h.
| #define MATHLIB_ALIGN_64BYTES (1 << MATHLIB_ALIGN_SHIFT_64BYTES) |
Align by 64-byte memory alignment.
Definition at line 240 of file MATHLIB_types.h.
| #define MATHLIB_ALIGN_128BYTES (1 << MATHLIB_ALIGN_SHIFT_128BYTES) |
Align by 128-byte memory alignment.
Definition at line 242 of file MATHLIB_types.h.
| #define MATHLIB_ALIGN_256BYTES (1 << MATHLIB_ALIGN_SHIFT_256BYTES) |
Align by 256-byte memory alignment.
Definition at line 244 of file MATHLIB_types.h.
| #define MATHLIB_L2DATA_ALIGN_SHIFT MATHLIB_ALIGN_SHIFT_64BYTES |
Set the default L2 data alignment.
Definition at line 247 of file MATHLIB_types.h.
| #define MATHLIB_L2DATA_ALIGNMENT (((uint32_t)1) << ((uint32_t)MATHLIB_L2DATA_ALIGN_SHIFT)) |
Macro that specifies the alignment of data buffers in L2 memory for optimal performance.
Definition at line 252 of file MATHLIB_types.h.
| typedef double MATHLIB_D64 |
Double precision floating point.
Definition at line 170 of file MATHLIB_types.h.
| typedef float MATHLIB_F32 |
Single precision floating point.
Definition at line 171 of file MATHLIB_types.h.
| typedef MATHLIB_STATUS_NAME MATHLIB_STATUS |
Return value for MATHLIB functions.
Definition at line 191 of file MATHLIB_types.h.
| typedef void* MATHLIB_kernelHandle |
Handle type for MATHLIB operations.
Definition at line 193 of file MATHLIB_types.h.
| enum MATHLIB_data_type_e |
The enumeration of all data types.
Definition at line 40 of file MATHLIB_bufParams.h.
| enum MATHLIB_dimension_e |
The enumeration of multidimensional buffer types.
| Enumerator | |
|---|---|
| MATHLIB_2D | Two dimensional buffer |
| MATHLIB_3D | Three dimensional buffer |
| MATHLIB_4D | Four dimensional buffer |
| MATHLIB_5D | Five dimensional buffer |
| MATHLIB_6D | Six dimensional buffer |
Definition at line 73 of file MATHLIB_bufParams.h.
| enum MATHLIB_STATUS_NAME |
The enumeration of all status codes.
Definition at line 174 of file MATHLIB_types.h.
Enumeration for the style of function implementation.
| Enumerator | |
|---|---|
| MATHLIB_FUNCTION_NATC | Natural C implementation of the function |
| MATHLIB_FUNCTION_OPTIMIZED | Optimized C implementation of the function for the MMA + C7x architecture |
| MATHLIB_FUNCTION_MAX | |
Definition at line 196 of file MATHLIB_types.h.
Buffer structure for input feature maps and coefficients of MATHLIB_CNN_convolve_row_ixX_ixX_oxX.
| Enumerator | |
|---|---|
| MATHLIB_LINEAR | Linear buffer. |
| MATHLIB_SE_CIRCULAR | streaming engine Circular buffer for input feature map managed by |
| MATHLIB_BUF_CIRCULAR | Circular buffer for coefficients. |
Definition at line 205 of file MATHLIB_types.h.
|
inlinestatic |
Inline function returns number of bytes per element given a type of MATHLIB_data_type_e.
Definition at line 145 of file MATHLIB_bufParams.h.