23 #ifndef COMMON_FFTLIB_TYPES_H_ 24 #define COMMON_FFTLIB_TYPES_H_ 1 28 #ifndef __OPENCL_VERSION__ 41 #include "c71/FFTLIB_defines.h" 43 #include "c7100/FFTLIB_defines.h" 44 #include "c7100/FFTLIB_types.h" 49 #if !defined(FFTLIB_DEBUGPRINT) 50 #define FFTLIB_DEBUGPRINT 0 53 #if (defined(_HOST_BUILD) && (FFTLIB_COMPILER_VERSION < 1003999)) 56 #define FFTLIB_const const 59 #define __PRAGMA(x) _Pragma(#x) 61 # define __INLINE_FUNC(x) __PRAGMA(FUNC_ALWAYS_INLINE) 63 # define __INLINE_FUNC(x) __PRAGMA(FUNC_ALWAYS_INLINE(x)) 72 #define FFTLIB_PRINTF(fmt,...) \ 74 fprintf(stdout, fmt, __VA_ARGS__); \ 77 #if FFTLIB_DEBUGPRINT > 0 78 #define FFTLIB_DEBUGPRINTFN(N, fmt, ...) \ 80 if (FFTLIB_DEBUGPRINT >= (N)) { \ 81 fprintf(stdout, "FFTLIB debug %s - %d: " fmt, __FUNCTION__, __LINE__, \ 86 #else // FFTLIB_DEBUGPRINT == 0 88 #define FFTLIB_DEBUGPRINTFN(N, fmt, ...) 90 #endif // #if FFTLIB_DEBUGPRINT 94 #if FFTLIB_DEBUGPRINT > 0 95 #define FFTLIB_DEBUGPRINTFN(N, fmt, ...) \ 96 if (FFTLIB_DEBUGPRINT >= (N)) { \ 97 fprintf(stderr, "FFTLIB debug %s - %d: " fmt, __FUNCTION__, __LINE__, \ 101 #define FFTLIB_PRINTF(fmt, ...) \ 102 fprintf(stderr, fmt, __VA_ARGS__) 104 #else // FFTLIB_DEBUGPRINT == 0 106 #define FFTLIB_DEBUGPRINTFN(N, fmt, ...) 107 #define FFTLIB_PRINTF(fmt, ...) 109 #endif // #if FFTLIB_DEBUGPRINT 110 #endif // #if defined(EVM_TEST) 112 #if defined(FFTLIB_MESSAGES) 115 #define FFTLIB_MESG(fmt, ...) fprintf(stderr, fmt, __VA_ARGS__) 117 #define FFTLIB_MESG(fmt, ...) 118 #endif //#if defined(FFTLIB_MESSAGES) 138 #define FFTLIB_SOFT_MMA_RESET 0 141 #define FFTLIB_STATIC_INLINE static inline 145 #include <c7x_scalable.h> 147 extern const c7x::uchar_vec FFTLIB_zeroVect_uchar_vec;
148 extern const c7x::ushort_vec FFTLIB_zeroVect_ushort_vec;
149 extern const c7x::uchar_vec FFTLIB_vperm_data_0_63;
225 #define FFTLIB_PARAM_SIZE 128 226 //#define FFTLIB_BYTE_WIDTH 64 227 #define FFTLIB_MMA_ACCUMULATOR_BYTE_WIDTH_8_BIT 4 228 #define FFTLIB_MMA_ACCUMULATOR_BYTE_WIDTH_16_BIT 8 229 #define FFTLIB_MMA_ACCUMULATOR_BYTE_WIDTH_32_BIT 16 238 #define FFTLIB_ALIGN_SHIFT_64BYTES \ 240 #define FFTLIB_ALIGN_SHIFT_128BYTES \ 242 #define FFTLIB_ALIGN_SHIFT_256BYTES \ 245 #define FFTLIB_ALIGN_64BYTES \ 246 (1 << FFTLIB_ALIGN_SHIFT_64BYTES) 247 #define FFTLIB_ALIGN_128BYTES \ 248 (1 << FFTLIB_ALIGN_SHIFT_128BYTES) 249 #define FFTLIB_ALIGN_256BYTES \ 250 (1 << FFTLIB_ALIGN_SHIFT_256BYTES) 252 #define FFTLIB_L2DATA_ALIGN_SHIFT \ 253 FFTLIB_ALIGN_SHIFT_64BYTES 257 #define FFTLIB_L2DATA_ALIGNMENT (((uint32_t)1) << ((uint32_t)FFTLIB_L2DATA_ALIGN_SHIFT)) 309 #if defined(QT_TEST) || defined(RTL_TEST) || defined(EVM_TEST) 310 #if defined(_HOST_BUILD) 311 #define FFTLIB_asm(string) ; 313 #define FFTLIB_asm(string); asm(string); 314 #endif // _HOST_BUILD 316 #define FFTLIB_asm(string) ; 326 #if defined(_HOST_BUILD) 328 #define xstr(x) str(x) 330 #define __attribute__() 331 #define FFTLIB_UNROLL(count) 333 #define FFTLIB_UNROLL(count) _Pragma(str(UNROLL(count))) 336 #define FFTLIB_UNROLL(COUNT) [[TI::unroll(COUNT)]] 339 #if defined(_HOST_BUILD) 341 #define __attribute__() 342 #define FFTLIB_MUST_ITERATE(initial, max, multiple) 344 #define FFTLIB_MUST_ITERATE(initial, max, multiple) _Pragma(str(MUST_ITERATE(initial, max, multiple))) 347 #define FFTLIB_MUST_ITERATE(INTIAL, MAX, MULTIPLE) [[TI::must_iterate(INTIAL, MAX, MULTIPLE)]] 350 #ifndef FFTLIB_NUMBER_RANDOM_DIM_TESTS 351 #define FFTLIB_NUMBER_RANDOM_DIM_TESTS 25 354 #if defined(PERFORMANCE_TEST) 355 #define FFTLIB_PERFORMANCE_TEST_PATTERN SEQUENTIAL 357 #define FFTLIB_PERFORMANCE_TEST_PATTERN RANDOM_SIGNED 360 #define FFTLIB_TEST_OUTPUT_HEAP 0 361 #if defined(_HOST_BUILD) 364 #define FFTLIB_TEST_OUTPUT_MSMC FFTLIB_TEST_OUTPUT_HEAP 366 #define FFTLIB_TEST_OUTPUT_MSMC 1 369 #define STRIDE_OPT_4CYCLE 1 382 #define FFTLIB_min(x, y) \ 383 (((x) < (y)) ? (x) : (y)) 384 #define FFTLIB_max(x, y) \ 385 (((x) < (y)) ? (y) : (x)) 386 #define FFTLIB_ceilingDiv(x, y) \ 397 extern const FFTLIB_MMA_CONFIG_REG configRegisterStruct_i32s_i32s_o32s;
399 extern const FFTLIB_MMA_CONFIG_REG configRegisterStruct_i16s_i16s_o16s;
400 extern const FFTLIB_MMA_CONFIG_REG configRegisterStruct_i16s_i16s_o16u;
401 extern const FFTLIB_MMA_CONFIG_REG configRegisterStruct_i16u_i16s_o16s;
402 extern const FFTLIB_MMA_CONFIG_REG configRegisterStruct_i16u_i16s_o16u;
404 extern const FFTLIB_MMA_CONFIG_REG configRegisterStruct_i8s_i8s_o8s;
405 extern const FFTLIB_MMA_CONFIG_REG configRegisterStruct_i8s_i8s_o8u;
406 extern const FFTLIB_MMA_CONFIG_REG configRegisterStruct_i8u_i8s_o8s;
407 extern const FFTLIB_MMA_CONFIG_REG configRegisterStruct_i8u_i8s_o8u;
409 extern const __HWA_OFFSET_REG offsetRegStruct_zeros;
410 extern const __HWA_OFFSET_REG offsetRegStruct_diagonal_32bit;
411 extern const __HWA_OFFSET_REG offsetRegStruct_diagonal_16bit;
412 extern const __HWA_OFFSET_REG offsetRegStruct_diagonal_8bit;
FFTLIB_STATUS_NAME
The enumeration of all status codes.
FFTLIB_FUNCTION_STYLE
Enumeration for the style of function implementation.
void * FFTLIB_kernelHandle
Handle type for FFTLIB operations.
float FFTLIB_F32
Single precision floating point.
FFTLIB_STATUS_NAME FFTLIB_STATUS
Return value for FFTLIB functions.
double FFTLIB_D64
Double precision floating point.