FFTLIB User Guide
FFTLIB_types.h File Reference

Introduction

File to hold common structure, enums, macros and functions for FFTLIB.

Version
0.1 - Jan 2018 : Initial Version

Definition in file FFTLIB_types.h.

Go to the source code of this file.

Macros

#define FFTLIB_DEBUGPRINT   0
 Enable debug printf statements. More...
 
#define FFTLIB_const   const
 
#define __PRAGMA(x)   _Pragma(#x)
 
#define __INLINE_FUNC(x)   __PRAGMA(FUNC_ALWAYS_INLINE(x))
 
#define FFTLIB_DEBUGPRINTFN(N, fmt, ...)
 
#define FFTLIB_PRINTF(fmt, ...)
 
#define FFTLIB_MESG(fmt, ...)
 
#define FFTLIB_SOFT_MMA_RESET   0
 
#define FFTLIB_STATIC_INLINE   static inline
 
#define FFTLIB_PARAM_SIZE   128
 Parameter structure size in bytes. More...
 
#define FFTLIB_MMA_ACCUMULATOR_BYTE_WIDTH_8_BIT   4
 MMA accumulator width in bytes for 8 bit output data width. More...
 
#define FFTLIB_MMA_ACCUMULATOR_BYTE_WIDTH_16_BIT   8
 MMA accumulator width in bytes for 16 bit output data width. More...
 
#define FFTLIB_MMA_ACCUMULATOR_BYTE_WIDTH_32_BIT   16
 MMA accumulator width in bytes for 32 bit output data width. More...
 
#define FFTLIB_ALIGN_SHIFT_64BYTES   6
 Number of bits to shift for 64-byte memory alignment. More...
 
#define FFTLIB_ALIGN_SHIFT_128BYTES   7
 Number of bits to shift for 128-byte memory alignment. More...
 
#define FFTLIB_ALIGN_SHIFT_256BYTES   8
 Number of bits to shift for 256-byte memory alignment. More...
 
#define FFTLIB_ALIGN_64BYTES   (1 << FFTLIB_ALIGN_SHIFT_64BYTES)
 Align by 64-byte memory alignment. More...
 
#define FFTLIB_ALIGN_128BYTES   (1 << FFTLIB_ALIGN_SHIFT_128BYTES)
 Align by 128-byte memory alignment. More...
 
#define FFTLIB_ALIGN_256BYTES   (1 << FFTLIB_ALIGN_SHIFT_256BYTES)
 Align by 256-byte memory alignment. More...
 
#define FFTLIB_L2DATA_ALIGN_SHIFT   FFTLIB_ALIGN_SHIFT_64BYTES
 Set the default L2 data alignment. More...
 
#define FFTLIB_L2DATA_ALIGNMENT   (((uint32_t) 1) << ((uint32_t) FFTLIB_L2DATA_ALIGN_SHIFT))
 Macro that specifies the alignment of data buffers in L2 memory for optimal performance. More...
 

Typedefs

typedef double FFTLIB_D64
 Double precision floating point. More...
 
typedef float FFTLIB_F32
 Single precision floating point. More...
 
typedef FFTLIB_STATUS_NAME FFTLIB_STATUS
 Return value for FFTLIB functions. More...
 
typedef void * FFTLIB_kernelHandle
 Handle type for FFTLIB operations. More...
 

Enumerations

enum  FFTLIB_STATUS_NAME {
  FFTLIB_SUCCESS = 0 , FFTLIB_ERR_FAILURE = 1 , FFTLIB_ERR_INVALID_VALUE = 2 , FFTLIB_ERR_INVALID_TYPE = 3 ,
  FFTLIB_ERR_INVALID_DIMENSION = 4 , FFTLIB_ERR_NULL_POINTER = 5 , FFTLIB_ERR_NOT_IMPLEMENTED = 6 , FFTLIB_ERR_NOT_EQUAL_WIDTH_STRIDE = 7 ,
  FFTLIB_ERR_NOT_ALIGNED_PTRS_STRIDES = 8 , FFTLIB_ERR_NOT_ALIGNED_WIDTHS = 9 , FFTLIB_ERR_BUFFER_TOO_SMALL = 10 , FFTLIB_ERR_INVALID_ACTIVATION = 11 ,
  FFTLIB_ERR_INVALID_SHIFT = 12 , FFTLIB_ERROR_MAX = 13 , FFTLIB_ERR_INVALID_OUTMODE , FFTLIB_ERR_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_INPUT_TYPE = 10000 ,
  FFTLIB_ERR_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_OUTPUT_TYPE = 10001 , FFTLIB_ERR_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_TYPE_COMBINATION , FFTLIB_ERR_MATRIX_MATRIX_MULTIPLY_ACCUMULATE_UNSUPPORTED_INPUT_TYPE , FFTLIB_ERR_MATRIX_MATRIX_MULTIPLY_ACCUMULATE_UNSUPPORTED_OUTPUT_TYPE ,
  FFTLIB_ERR_MATRIX_MATRIX_MULTIPLY_ACCUMULATE_UNSUPPORTED_TYPE_COMBINATION , FFTLIB_ERR_MATRIX_TRANSPOSE_UNSUPPORTED_INPUT_TYPE = 12000 , FFTLIB_ERR_MATRIX_TRANSPOSE_UNSUPPORTED_OUTPUT_TYPE = 12001 , FFTLIB_ERR_MATRIX_TRANSPOSE_UNSUPPORTED_TYPE_COMBINATION ,
  FFTLIB_ERR_POINTWISE_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_INPUT_TYPE , FFTLIB_ERR_POINTWISE_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_OUTPUT_TYPE , FFTLIB_ERR_POINTWISE_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_TYPE_COMBINATION
}
 The enumeration of all status codes. More...
 
enum  FFTLIB_FUNCTION_STYLE { FFTLIB_FUNCTION_NATC = 0 , FFTLIB_FUNCTION_OPTIMIZED , FFTLIB_FUNCTION_MAX = 128 }
 Enumeration for the style of function implementation. More...
 

Macro Definition Documentation

◆ FFTLIB_DEBUGPRINT

#define FFTLIB_DEBUGPRINT   0

Enable debug printf statements.

Definition at line 51 of file FFTLIB_types.h.

◆ FFTLIB_const

#define FFTLIB_const   const

Definition at line 57 of file FFTLIB_types.h.

◆ __PRAGMA

#define __PRAGMA (   x)    _Pragma(#x)

Definition at line 60 of file FFTLIB_types.h.

◆ __INLINE_FUNC

#define __INLINE_FUNC (   x)    __PRAGMA(FUNC_ALWAYS_INLINE(x))

Definition at line 64 of file FFTLIB_types.h.

◆ FFTLIB_DEBUGPRINTFN

#define FFTLIB_DEBUGPRINTFN (   N,
  fmt,
  ... 
)

Definition at line 104 of file FFTLIB_types.h.

◆ FFTLIB_PRINTF

#define FFTLIB_PRINTF (   fmt,
  ... 
)

Definition at line 105 of file FFTLIB_types.h.

◆ FFTLIB_MESG

#define FFTLIB_MESG (   fmt,
  ... 
)

Definition at line 115 of file FFTLIB_types.h.

◆ FFTLIB_SOFT_MMA_RESET

#define FFTLIB_SOFT_MMA_RESET   0

Definition at line 135 of file FFTLIB_types.h.

◆ FFTLIB_STATIC_INLINE

#define FFTLIB_STATIC_INLINE   static inline

Definition at line 138 of file FFTLIB_types.h.

◆ FFTLIB_PARAM_SIZE

#define FFTLIB_PARAM_SIZE   128

Parameter structure size in bytes.

Definition at line 230 of file FFTLIB_types.h.

◆ FFTLIB_MMA_ACCUMULATOR_BYTE_WIDTH_8_BIT

#define FFTLIB_MMA_ACCUMULATOR_BYTE_WIDTH_8_BIT   4

MMA accumulator width in bytes for 8 bit output data width.

Definition at line 232 of file FFTLIB_types.h.

◆ FFTLIB_MMA_ACCUMULATOR_BYTE_WIDTH_16_BIT

#define FFTLIB_MMA_ACCUMULATOR_BYTE_WIDTH_16_BIT   8

MMA accumulator width in bytes for 16 bit output data width.

Definition at line 233 of file FFTLIB_types.h.

◆ FFTLIB_MMA_ACCUMULATOR_BYTE_WIDTH_32_BIT

#define FFTLIB_MMA_ACCUMULATOR_BYTE_WIDTH_32_BIT   16

MMA accumulator width in bytes for 32 bit output data width.

Definition at line 234 of file FFTLIB_types.h.

◆ FFTLIB_ALIGN_SHIFT_64BYTES

#define FFTLIB_ALIGN_SHIFT_64BYTES   6

Number of bits to shift for 64-byte memory alignment.

Definition at line 242 of file FFTLIB_types.h.

◆ FFTLIB_ALIGN_SHIFT_128BYTES

#define FFTLIB_ALIGN_SHIFT_128BYTES   7

Number of bits to shift for 128-byte memory alignment.

Definition at line 243 of file FFTLIB_types.h.

◆ FFTLIB_ALIGN_SHIFT_256BYTES

#define FFTLIB_ALIGN_SHIFT_256BYTES   8

Number of bits to shift for 256-byte memory alignment.

Definition at line 244 of file FFTLIB_types.h.

◆ FFTLIB_ALIGN_64BYTES

#define FFTLIB_ALIGN_64BYTES   (1 << FFTLIB_ALIGN_SHIFT_64BYTES)

Align by 64-byte memory alignment.

Definition at line 246 of file FFTLIB_types.h.

◆ FFTLIB_ALIGN_128BYTES

#define FFTLIB_ALIGN_128BYTES   (1 << FFTLIB_ALIGN_SHIFT_128BYTES)

Align by 128-byte memory alignment.

Definition at line 247 of file FFTLIB_types.h.

◆ FFTLIB_ALIGN_256BYTES

#define FFTLIB_ALIGN_256BYTES   (1 << FFTLIB_ALIGN_SHIFT_256BYTES)

Align by 256-byte memory alignment.

Definition at line 248 of file FFTLIB_types.h.

◆ FFTLIB_L2DATA_ALIGN_SHIFT

#define FFTLIB_L2DATA_ALIGN_SHIFT   FFTLIB_ALIGN_SHIFT_64BYTES

Set the default L2 data alignment.

Definition at line 250 of file FFTLIB_types.h.

◆ FFTLIB_L2DATA_ALIGNMENT

#define FFTLIB_L2DATA_ALIGNMENT   (((uint32_t) 1) << ((uint32_t) FFTLIB_L2DATA_ALIGN_SHIFT))

Macro that specifies the alignment of data buffers in L2 memory for optimal performance.

Definition at line 254 of file FFTLIB_types.h.

Typedef Documentation

◆ FFTLIB_D64

typedef double FFTLIB_D64

Double precision floating point.

Definition at line 165 of file FFTLIB_types.h.

◆ FFTLIB_F32

typedef float FFTLIB_F32

Single precision floating point.

Definition at line 166 of file FFTLIB_types.h.

◆ FFTLIB_STATUS

Return value for FFTLIB functions.

Definition at line 212 of file FFTLIB_types.h.

◆ FFTLIB_kernelHandle

typedef void* FFTLIB_kernelHandle

Handle type for FFTLIB operations.

Definition at line 214 of file FFTLIB_types.h.

Enumeration Type Documentation

◆ FFTLIB_STATUS_NAME

The enumeration of all status codes.

Enumerator
FFTLIB_SUCCESS 

0 => No error

FFTLIB_ERR_FAILURE 

1 => Unspecified error

FFTLIB_ERR_INVALID_VALUE 

2 => Invalid parameter value

FFTLIB_ERR_INVALID_TYPE 

3 => Invalid parameter type (FFTLIB_data_type_e data_type)

FFTLIB_ERR_INVALID_DIMENSION 

4 => Dimension parameter (width/height) is too big/small

FFTLIB_ERR_NULL_POINTER 

5 => Unsupported null pointer condition

FFTLIB_ERR_NOT_IMPLEMENTED 

6 => Parameter configuration is not supported/implemented

FFTLIB_ERR_NOT_EQUAL_WIDTH_STRIDE 

7 => Stride should be equal to width * element size

FFTLIB_ERR_NOT_ALIGNED_PTRS_STRIDES 

8 => Pointers and stride values are not aligned to documented value

FFTLIB_ERR_NOT_ALIGNED_WIDTHS 

9 => Width values are not aligned to documented value

FFTLIB_ERR_BUFFER_TOO_SMALL 

10 => Buffer size not large enough

FFTLIB_ERR_INVALID_ACTIVATION 

11 => Activation selection incompatible with data type

FFTLIB_ERR_INVALID_SHIFT 

12 => Requested shift amount is not valid

FFTLIB_ERROR_MAX 
FFTLIB_ERR_INVALID_OUTMODE 
FFTLIB_ERR_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_INPUT_TYPE 

10000 => Unsupported input data type

FFTLIB_ERR_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_OUTPUT_TYPE 

10001 => Unsupported output data type

FFTLIB_ERR_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_TYPE_COMBINATION 

10002 => Unsupported combination of input and output data type

FFTLIB_ERR_MATRIX_MATRIX_MULTIPLY_ACCUMULATE_UNSUPPORTED_INPUT_TYPE 

11000 => Unsupported input data type

FFTLIB_ERR_MATRIX_MATRIX_MULTIPLY_ACCUMULATE_UNSUPPORTED_OUTPUT_TYPE 

11001 => Unsupported output data type

FFTLIB_ERR_MATRIX_MATRIX_MULTIPLY_ACCUMULATE_UNSUPPORTED_TYPE_COMBINATION 

11002 => Unsupported combination of input and output data type

FFTLIB_ERR_MATRIX_TRANSPOSE_UNSUPPORTED_INPUT_TYPE 

12000 => Unsupported input data type

FFTLIB_ERR_MATRIX_TRANSPOSE_UNSUPPORTED_OUTPUT_TYPE 

12001 => Unsupported output data type

FFTLIB_ERR_MATRIX_TRANSPOSE_UNSUPPORTED_TYPE_COMBINATION 

12002 => Unsupported combination of input and output data type

FFTLIB_ERR_POINTWISE_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_INPUT_TYPE 

13000 => Unsupported input data type

FFTLIB_ERR_POINTWISE_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_OUTPUT_TYPE 

13001 => Unsupported output data type

FFTLIB_ERR_POINTWISE_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_TYPE_COMBINATION 

13002 => Unsupported combination of input and output data type

Definition at line 169 of file FFTLIB_types.h.

◆ FFTLIB_FUNCTION_STYLE

Enumeration for the style of function implementation.

Enumerator
FFTLIB_FUNCTION_NATC 

Natural C implementation of the function

FFTLIB_FUNCTION_OPTIMIZED 

Optimized C implementation of the function for the MMA + C7x architecture

FFTLIB_FUNCTION_MAX 

Definition at line 217 of file FFTLIB_types.h.