FFTLIB User Guide
Common definitions

Introduction

This module consists of definitions (macros, structures, utility functions) that are commonly applicable to all FFTLIB kernels.

File to hold buffer parameter related info for FFTLIB.

Version
0.1 - Jan 2018 : Initial Version

Data Structures

struct  FFTLIB_bufParams1D_t
 A structure for a 1 dimensional buffer descriptor. More...
 
struct  FFTLIB_bufParams2D_t
 A structure for a 2 dimensional buffer descriptor. More...
 
struct  FFTLIB_bufParams3D_t
 A structure for a 3 dimensional buffer descriptor. More...
 
struct  FFTLIB_bufParamsND_t
 A structure for a N dimensional buffer descriptor. More...
 

Functions

static int32_t FFTLIB_sizeof (uint32_t type)
 Inline function returns number of bytes per element given a type of _FFTLIB_data_type_e. 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_data_type_e {
  FFTLIB_INT8 = 0, FFTLIB_INT16 = 1, FFTLIB_INT32 = 2, FFTLIB_INT64 = 3,
  FFTLIB_INT128 = 4, FFTLIB_UINT8 = 5, FFTLIB_UINT16 = 6, FFTLIB_UINT24 = 7,
  FFTLIB_UINT32 = 8, FFTLIB_UINT64 = 9, FFTLIB_UINT128 = 10, FFTLIB_FLOAT16 = 11,
  FFTLIB_FLOAT32 = 12, FFTLIB_FLOAT64 = 13
}
 The enumeration of all data types. More...
 
enum  FFTLIB_dimension_e {
  FFTLIB_2D = 0, FFTLIB_3D = 1, FFTLIB_4D = 2, FFTLIB_5D = 3,
  FFTLIB_6D = 4
}
 The enumeration of multidimensional buffer types. More...
 
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_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_INPUT_TYPE = 10000, FFTLIB_ERR_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_OUTPUT_TYPE = 10001,
  FFTLIB_ERR_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_TYPE_COMBINATION = 10002, FFTLIB_ERR_MATRIX_MATRIX_MULTIPLY_ACCUMULATE_UNSUPPORTED_INPUT_TYPE = 11000, FFTLIB_ERR_MATRIX_MATRIX_MULTIPLY_ACCUMULATE_UNSUPPORTED_OUTPUT_TYPE = 11001, FFTLIB_ERR_MATRIX_MATRIX_MULTIPLY_ACCUMULATE_UNSUPPORTED_TYPE_COMBINATION = 11002,
  FFTLIB_ERR_MATRIX_TRANSPOSE_UNSUPPORTED_INPUT_TYPE = 12000, FFTLIB_ERR_MATRIX_TRANSPOSE_UNSUPPORTED_OUTPUT_TYPE = 12001, FFTLIB_ERR_MATRIX_TRANSPOSE_UNSUPPORTED_TYPE_COMBINATION = 12002, FFTLIB_ERR_POINTWISE_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_INPUT_TYPE = 13000,
  FFTLIB_ERR_POINTWISE_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_OUTPUT_TYPE = 13001, FFTLIB_ERR_POINTWISE_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_TYPE_COMBINATION = 13002
}
 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...
 

Macros

#define FFTLIB_ISSIGNED(type)   ((type) < FFTLIB_UINT8 || (type) > FFTLIB_UINT128)
 
#define FFTLIB_SIGNEDNESS(type)   (FFTLIB_ISSIGNED((type)) ? "signed" : "unsigned")
 
#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...
 

Macro Definition Documentation

◆ FFTLIB_ISSIGNED

#define FFTLIB_ISSIGNED (   type)    ((type) < FFTLIB_UINT8 || (type) > FFTLIB_UINT128)

Definition at line 69 of file FFTLIB_bufParams.h.

◆ FFTLIB_SIGNEDNESS

#define FFTLIB_SIGNEDNESS (   type)    (FFTLIB_ISSIGNED((type)) ? "signed" : "unsigned")

Definition at line 70 of file FFTLIB_bufParams.h.

◆ FFTLIB_PARAM_SIZE

#define FFTLIB_PARAM_SIZE   128

Parameter structure size in bytes.

Definition at line 225 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 227 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 228 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 229 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 238 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 240 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 242 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 245 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 249 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 252 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 257 of file FFTLIB_types.h.

Typedef Documentation

◆ FFTLIB_D64

typedef double FFTLIB_D64

Double precision floating point.

Definition at line 169 of file FFTLIB_types.h.

◆ FFTLIB_F32

typedef float FFTLIB_F32

Single precision floating point.

Definition at line 170 of file FFTLIB_types.h.

◆ FFTLIB_STATUS

Return value for FFTLIB functions.

Definition at line 207 of file FFTLIB_types.h.

◆ FFTLIB_kernelHandle

typedef void* FFTLIB_kernelHandle

Handle type for FFTLIB operations.

Definition at line 209 of file FFTLIB_types.h.

Enumeration Type Documentation

◆ FFTLIB_data_type_e

The enumeration of all data types.

Enumerator
FFTLIB_INT8 

Signed 8-bit integer

FFTLIB_INT16 

Signed 16-bit integer

FFTLIB_INT32 

Signed 32-bit integer

FFTLIB_INT64 

Signed 64-bit integer

FFTLIB_INT128 

Signed 128-bit integer

FFTLIB_UINT8 

Unsigned 8-bit integer

FFTLIB_UINT16 

Unsigned 16-bit integer

FFTLIB_UINT24 

Unsigned 24-bit integer

FFTLIB_UINT32 

Unsigned 32-bit integer

FFTLIB_UINT64 

Unsigned 64-bit integer

FFTLIB_UINT128 

Unsigned 128-bit integer

FFTLIB_FLOAT16 

16-bit floating point number

FFTLIB_FLOAT32 

32-bit floating point number

FFTLIB_FLOAT64 

64-bit floating point number

Definition at line 40 of file FFTLIB_bufParams.h.

◆ FFTLIB_dimension_e

The enumeration of multidimensional buffer types.

Enumerator
FFTLIB_2D 

Two dimensional buffer

FFTLIB_3D 

Three dimensional buffer

FFTLIB_4D 

Four dimensional buffer

FFTLIB_5D 

Five dimensional buffer

FFTLIB_6D 

Six dimensional buffer

Definition at line 73 of file FFTLIB_bufParams.h.

◆ 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_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 173 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 212 of file FFTLIB_types.h.

Function Documentation

◆ FFTLIB_sizeof()

static int32_t FFTLIB_sizeof ( uint32_t  type)
inlinestatic

Inline function returns number of bytes per element given a type of _FFTLIB_data_type_e.

Definition at line 145 of file FFTLIB_bufParams.h.