23 #ifndef COMMON_FFTLIB_TYPES_H_
24 #define COMMON_FFTLIB_TYPES_H_ 1
28 #ifndef __OPENCL_VERSION__
40 #if defined(__C7100__) || defined(__C7120__) || defined(__C7502__) || defined(__C7504__) || defined(__C7508__) || \
53 #if !defined(FFTLIB_DEBUGPRINT)
54 #define FFTLIB_DEBUGPRINT 0
57 #if (defined(_HOST_BUILD) && (FFTLIB_COMPILER_VERSION < 1003999))
60 #define FFTLIB_const const
63 #define __PRAGMA(x) _Pragma(#x)
65 #define __INLINE_FUNC(x) __PRAGMA(FUNC_ALWAYS_INLINE)
67 #define __INLINE_FUNC(x) __PRAGMA(FUNC_ALWAYS_INLINE(x))
76 #define FFTLIB_PRINTF(fmt, ...) \
78 fprintf(stdout, fmt, __VA_ARGS__); \
81 #if FFTLIB_DEBUGPRINT > 0
82 #define FFTLIB_DEBUGPRINTFN(N, fmt, ...) \
84 if (FFTLIB_DEBUGPRINT >= (N)) { \
85 fprintf(stdout, "FFTLIB debug %s - %d: " fmt, __FUNCTION__, __LINE__, __VA_ARGS__); \
91 #define FFTLIB_DEBUGPRINTFN(N, fmt, ...)
97 #if FFTLIB_DEBUGPRINT > 0
98 #define FFTLIB_DEBUGPRINTFN(N, fmt, ...) \
99 if (FFTLIB_DEBUGPRINT >= (N)) { \
100 fprintf(stderr, "FFTLIB debug %s - %d: " fmt, __FUNCTION__, __LINE__, __VA_ARGS__); \
103 #define FFTLIB_PRINTF(fmt, ...) fprintf(stderr, fmt, __VA_ARGS__)
107 #define FFTLIB_DEBUGPRINTFN(N, fmt, ...)
108 #define FFTLIB_PRINTF(fmt, ...)
113 #if defined(FFTLIB_MESSAGES)
116 #define FFTLIB_MESG(fmt, ...) fprintf(stderr, fmt, __VA_ARGS__)
118 #define FFTLIB_MESG(fmt, ...)
138 #define FFTLIB_SOFT_MMA_RESET 0
141 #define FFTLIB_STATIC_INLINE static inline
144 #include <c7x_scalable.h>
148 extern const c7x::uchar_vec FFTLIB_vperm_data_0_63;
233 #define FFTLIB_PARAM_SIZE 128
235 #define FFTLIB_MMA_ACCUMULATOR_BYTE_WIDTH_8_BIT 4
236 #define FFTLIB_MMA_ACCUMULATOR_BYTE_WIDTH_16_BIT 8
237 #define FFTLIB_MMA_ACCUMULATOR_BYTE_WIDTH_32_BIT 16
245 #define FFTLIB_ALIGN_SHIFT_64BYTES 6
246 #define FFTLIB_ALIGN_SHIFT_128BYTES 7
247 #define FFTLIB_ALIGN_SHIFT_256BYTES 8
249 #define FFTLIB_ALIGN_64BYTES (1 << FFTLIB_ALIGN_SHIFT_64BYTES)
250 #define FFTLIB_ALIGN_128BYTES (1 << FFTLIB_ALIGN_SHIFT_128BYTES)
251 #define FFTLIB_ALIGN_256BYTES (1 << FFTLIB_ALIGN_SHIFT_256BYTES)
253 #define FFTLIB_L2DATA_ALIGN_SHIFT FFTLIB_ALIGN_SHIFT_64BYTES
257 #define FFTLIB_L2DATA_ALIGNMENT (((uint32_t) 1) << ((uint32_t) FFTLIB_L2DATA_ALIGN_SHIFT))
308 #if defined(QT_TEST) || defined(RTL_TEST) || defined(EVM_TEST)
309 #if defined(_HOST_BUILD)
310 #define FFTLIB_asm(string) ;
312 #define FFTLIB_asm(string) \
317 #define FFTLIB_asm(string) ;
327 #if defined(_HOST_BUILD)
329 #define xstr(x) str(x)
331 #define __attribute__()
332 #define FFTLIB_UNROLL(count)
334 #define FFTLIB_UNROLL(count) _Pragma(str(UNROLL(count)))
337 #define FFTLIB_UNROLL(COUNT) [[TI::unroll(COUNT)]]
340 #if defined(_HOST_BUILD)
342 #define __attribute__()
343 #define FFTLIB_MUST_ITERATE(initial, max, multiple)
345 #define FFTLIB_MUST_ITERATE(initial, max, multiple) _Pragma(str(MUST_ITERATE(initial, max, multiple)))
348 #define FFTLIB_MUST_ITERATE(INTIAL, MAX, MULTIPLE) [[TI::must_iterate(INTIAL, MAX, MULTIPLE)]]
351 #ifndef FFTLIB_NUMBER_RANDOM_DIM_TESTS
352 #define FFTLIB_NUMBER_RANDOM_DIM_TESTS 25
355 #if defined(PERFORMANCE_TEST)
356 #define FFTLIB_PERFORMANCE_TEST_PATTERN SEQUENTIAL
358 #define FFTLIB_PERFORMANCE_TEST_PATTERN RANDOM_SIGNED
361 #define FFTLIB_TEST_OUTPUT_HEAP 0
362 #if defined(_HOST_BUILD)
365 #define FFTLIB_TEST_OUTPUT_MSMC FFTLIB_TEST_OUTPUT_HEAP
367 #define FFTLIB_TEST_OUTPUT_MSMC 1
370 #define STRIDE_OPT_4CYCLE 1
383 #define FFTLIB_min(x, y) (((x) < (y)) ? (x) : (y))
384 #define FFTLIB_max(x, y) (((x) < (y)) ? (y) : (x))
385 #define FFTLIB_ceilingDiv(x, y) \
386 (((x) + (y) -1) / (y))
File to hold buffer parameter related info for FFTLIB.
double FFTLIB_D64
Double precision floating point.
void * FFTLIB_kernelHandle
Handle type for FFTLIB operations.
FFTLIB_STATUS_NAME
The enumeration of all status codes.
@ FFTLIB_ERR_NOT_IMPLEMENTED
@ FFTLIB_ERR_INVALID_ACTIVATION
@ FFTLIB_ERR_INVALID_TYPE
@ FFTLIB_ERR_MATRIX_MATRIX_MULTIPLY_ACCUMULATE_UNSUPPORTED_TYPE_COMBINATION
@ FFTLIB_ERR_NOT_EQUAL_WIDTH_STRIDE
@ FFTLIB_ERR_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_TYPE_COMBINATION
@ FFTLIB_ERR_MATRIX_MATRIX_MULTIPLY_ACCUMULATE_UNSUPPORTED_INPUT_TYPE
@ FFTLIB_ERR_POINTWISE_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_OUTPUT_TYPE
@ FFTLIB_ERR_NULL_POINTER
@ FFTLIB_ERR_INVALID_DIMENSION
@ FFTLIB_ERR_MATRIX_TRANSPOSE_UNSUPPORTED_TYPE_COMBINATION
@ FFTLIB_ERR_POINTWISE_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_TYPE_COMBINATION
@ FFTLIB_ERR_MATRIX_TRANSPOSE_UNSUPPORTED_INPUT_TYPE
@ FFTLIB_ERR_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_OUTPUT_TYPE
@ FFTLIB_ERR_INVALID_SHIFT
@ FFTLIB_ERR_BUFFER_TOO_SMALL
@ FFTLIB_ERR_MATRIX_TRANSPOSE_UNSUPPORTED_OUTPUT_TYPE
@ FFTLIB_ERR_INVALID_OUTMODE
@ FFTLIB_ERR_MATRIX_MATRIX_MULTIPLY_ACCUMULATE_UNSUPPORTED_OUTPUT_TYPE
@ FFTLIB_ERR_POINTWISE_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_INPUT_TYPE
@ FFTLIB_ERR_INVALID_VALUE
@ FFTLIB_ERR_NOT_ALIGNED_WIDTHS
@ FFTLIB_ERR_NOT_ALIGNED_PTRS_STRIDES
@ FFTLIB_ERR_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_INPUT_TYPE
float FFTLIB_F32
Single precision floating point.
FFTLIB_STATUS_NAME FFTLIB_STATUS
Return value for FFTLIB functions.
FFTLIB_FUNCTION_STYLE
Enumeration for the style of function implementation.
@ FFTLIB_FUNCTION_OPTIMIZED
const __HWA_OFFSET_REG offsetRegStruct_zeros
const FFTLIB_MMA_CONFIG_REG configRegisterStruct_i16s_i16s_o16u
const FFTLIB_MMA_CONFIG_REG configRegisterStruct_i16s_i16s_o16s
const __HWA_OFFSET_REG offsetRegStruct_diagonal_16bit
const FFTLIB_MMA_CONFIG_REG configRegisterStruct_i32s_i32s_o32s
const __HWA_OFFSET_REG offsetRegStruct_diagonal_8bit
const FFTLIB_MMA_CONFIG_REG configRegisterStruct_i8u_i8s_o8u
const FFTLIB_MMA_CONFIG_REG configRegisterStruct_i8s_i8s_o8s
const FFTLIB_MMA_CONFIG_REG configRegisterStruct_i16u_i16s_o16s
const FFTLIB_MMA_CONFIG_REG configRegisterStruct_i8u_i8s_o8s
const FFTLIB_MMA_CONFIG_REG configRegisterStruct_i16u_i16s_o16u
const FFTLIB_MMA_CONFIG_REG configRegisterStruct_i8s_i8s_o8u
const __HWA_OFFSET_REG offsetRegStruct_diagonal_32bit
#define FFTLIB_MMA_CONFIG_REG
File to hold common structure, enums, macros and functions for FFTLIB.
const c7x::ushort_vec FFTLIB_zeroVect_ushort_vec
const c7x::uchar_vec FFTLIB_zeroVect_uchar_vec