38 using ::Vc::VectorAlignment;
50 #if defined(HLTCA_STANDALONE) 51 typedef unsigned char UChar_t;
52 typedef UChar_t Byte_t;
54 typedef double Double_t;
63 return (T(0) < val) - (val < T(0));
67 #define ASSERT(v, msg) 69 #define ASSERT(v, msg) \ 72 std::cerr << __FILE__ << ":" << __LINE__ << " assertion failed: " << #v << " = " << (v) << "\n" << msg << std::endl; \ 86 struct HLTTPCCA_STATIC_ASSERT_FAILURE;
88 struct HLTTPCCA_STATIC_ASSERT_FAILURE<true> {
92 #define HLTTPCCA_STATIC_ASSERT_CONCAT_HELPER(a, b) a##b 93 #define HLTTPCCA_STATIC_ASSERT_CONCAT(a, b) HLTTPCCA_STATIC_ASSERT_CONCAT_HELPER(a, b) 94 #define STATIC_ASSERT(cond, msg) \ 95 typedef HLTTPCCA_STATIC_ASSERT_FAILURE<cond> HLTTPCCA_STATIC_ASSERT_CONCAT(_STATIC_ASSERTION_FAILED_##msg, __LINE__); \ 96 HLTTPCCA_STATIC_ASSERT_CONCAT(_STATIC_ASSERTION_FAILED_##msg, __LINE__) Error_##msg; \ 100 template <
typename T1>
101 void UNUSED_PARAM1(
const T1 &)
104 template <
typename T1,
typename T2>
105 void UNUSED_PARAM2(
const T1 &,
const T2 &)
108 template <
typename T1,
typename T2,
typename T3>
109 void UNUSED_PARAM3(
const T1 &,
const T2 &,
const T3 &)
112 template <
typename T1,
typename T2,
typename T3,
typename T4>
113 void UNUSED_PARAM4(
const T1 &,
const T2 &,
const T3 &,
const T4 &)
116 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
117 void UNUSED_PARAM5(
const T1 &,
const T2 &,
const T3 &,
const T4 &,
const T5 &)
120 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
121 void UNUSED_PARAM6(
const T1 &,
const T2 &,
const T3 &,
const T4 &,
const T5 &,
const T6 &)
124 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
125 void UNUSED_PARAM7(
const T1 &,
const T2 &,
const T3 &,
const T4 &,
const T5 &,
const T6 &,
const T7 &)
128 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8>
129 void UNUSED_PARAM8(
const T1 &,
const T2 &,
const T3 &,
const T4 &,
const T5 &,
const T6 &,
const T7 &,
const T8 &)
132 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8,
typename T9>
133 void UNUSED_PARAM9(
const T1 &,
const T2 &,
const T3 &,
const T4 &,
const T5 &,
const T6 &,
const T7 &,
const T8 &,
const T9 &)
138 #define unrolled_loop4(_type_, _it_, _start_, _end_, _code_) \ 139 if (_start_ + 0 < _end_) { \ 140 enum { _it_ = (_start_ + 0) < _end_ ? (_start_ + 0) : _start_ }; \ 143 if (_start_ + 1 < _end_) { \ 144 enum { _it_ = (_start_ + 1) < _end_ ? (_start_ + 1) : _start_ }; \ 147 if (_start_ + 2 < _end_) { \ 148 enum { _it_ = (_start_ + 2) < _end_ ? (_start_ + 2) : _start_ }; \ 151 if (_start_ + 3 < _end_) { \ 152 enum { _it_ = (_start_ + 3) < _end_ ? (_start_ + 3) : _start_ }; \ 159 #define MAY_ALIAS __attribute__((__may_alias__)) 164 #if defined(__GNUC__) && __GNUC__ - 0 >= 3 165 #define ISLIKELY(x) __builtin_expect(!!(x), 1) 166 #define ISUNLIKELY(x) __builtin_expect(!!(x), 0) 168 #define ISLIKELY(x) (x) 169 #define ISUNLIKELY(x) (x)