1 // -*- C++ -*- 2 /** @file */ 3 #pragma once 4 5 #include <cstdint> 6 #include <iostream> 7 8 // For compiler detection 9 #include "arch.hpp" 10 11 12 #define ARM_COMPUTE_DISABLE_UNROLL 13 // For loop (not for fusion unrolling functions) 14 #define MEMORY_POOL_ALIGNMENT 128 15 //#define MEMORY_ALLOCATION_DEBUG 16 17 // TMP_ALLOC must be defined to use the library 18 // It is generally defined in an external header not 19 // part of the library. 20 // By default it is using the malloc allocator 21 22 #ifndef TMP_ALLOC 23 #define TMP_ALLOC malloc_allocator 24 #endif 25 26 #if !defined(GCC_COMPILER) 27 // clang / AC6 28 #if defined(ARM_COMPUTE_DISABLE_UNROLL) 29 #define UNROLL_LOOP _Pragma ("clang loop unroll(disable)") 30 #else 31 #define UNROLL_LOOP _Pragma("clang loop unroll_count(4)") 32 #endif 33 34 #define DISABLE_LOOP_UNROLL _Pragma("clang loop unroll(disable)") 35 36 #else 37 // GCC 38 #define UNROLL_LOOP 39 #define DISABLE_LOOP_UNROLL 40 #endif 41 42 namespace arm_cmsis_dsp { 43 44 /** \addtogroup COMMON Common types and constants 45 * \ingroup DSPPP 46 * @{ 47 */ 48 //! Dynamic objects (dimensions only known at runtime) 49 constexpr int DYNAMIC = -1; 50 51 //! Dynamic objects (dimensions only known at runtime) but with some constraints (like stride == nb_cols) 52 constexpr int CONSTRAINED_DYNAMIC = -2; 53 54 //! index datatype. It must be a signed datatype 55 typedef int32_t index_t; 56 //! Vector length datatype. Iy must be a signed datatype. 57 typedef int32_t vector_length_t; 58 59 /*! @} */ 60 61 /** \addtogroup DEBUG Tools for debugging 62 * \ingroup DSPPP 63 * @{ 64 */ 65 66 /** 67 * @brief Prints a textual representation of a type. 68 * 69 * @tparam T The datatype to display 70 */ 71 template <typename T> PrintType(void)72void PrintType(void) 73 { 74 //T t; 75 std::cout << __PRETTY_FUNCTION__ << "\r\n"; 76 }; 77 78 /*! @} */ 79 } 80