26 using ::Vc::VectorAlignment;
38 #if defined(FTSCA_STANDALONE) 39 typedef unsigned char UChar_t;
40 typedef UChar_t Byte_t;
42 typedef double Double_t;
51 return (T(0) < val) - (val < T(0));
57 return reciprocal(val);
61 #define ASSERT(v, msg) 63 #define ASSERT(v, msg) \ 66 std::cerr << __FILE__ << ":" << __LINE__ << " assertion failed: " << #v << " = " << (v) << "\n" << msg << std::endl; \ 80 struct FTSCA_STATIC_ASSERT_FAILURE;
82 struct FTSCA_STATIC_ASSERT_FAILURE<true> {
86 #define FTSCA_STATIC_ASSERT_CONCAT_HELPER(a, b) a##b 87 #define FTSCA_STATIC_ASSERT_CONCAT(a, b) FTSCA_STATIC_ASSERT_CONCAT_HELPER(a, b) 88 #define STATIC_ASSERT(cond, msg) \ 89 typedef FTSCA_STATIC_ASSERT_FAILURE<cond> FTSCA_STATIC_ASSERT_CONCAT(_STATIC_ASSERTION_FAILED_##msg, __LINE__); \ 90 FTSCA_STATIC_ASSERT_CONCAT(_STATIC_ASSERTION_FAILED_##msg, __LINE__) Error_##msg; \ 94 template <
typename T1>
95 void UNUSED_PARAM1(
const T1 &)
98 template <
typename T1,
typename T2>
99 void UNUSED_PARAM2(
const T1 &,
const T2 &)
102 template <
typename T1,
typename T2,
typename T3>
103 void UNUSED_PARAM3(
const T1 &,
const T2 &,
const T3 &)
106 template <
typename T1,
typename T2,
typename T3,
typename T4>
107 void UNUSED_PARAM4(
const T1 &,
const T2 &,
const T3 &,
const T4 &)
110 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
111 void UNUSED_PARAM5(
const T1 &,
const T2 &,
const T3 &,
const T4 &,
const T5 &)
114 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
115 void UNUSED_PARAM6(
const T1 &,
const T2 &,
const T3 &,
const T4 &,
const T5 &,
const T6 &)
118 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
119 void UNUSED_PARAM7(
const T1 &,
const T2 &,
const T3 &,
const T4 &,
const T5 &,
const T6 &,
const T7 &)
122 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8>
123 void UNUSED_PARAM8(
const T1 &,
const T2 &,
const T3 &,
const T4 &,
const T5 &,
const T6 &,
const T7 &,
const T8 &)
126 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8,
typename T9>
127 void UNUSED_PARAM9(
const T1 &,
const T2 &,
const T3 &,
const T4 &,
const T5 &,
const T6 &,
const T7 &,
const T8 &,
const T9 &)
132 #define unrolled_loop4(_type_, _it_, _start_, _end_, _code_) \ 133 if (_start_ + 0 < _end_) { \ 134 enum { _it_ = (_start_ + 0) < _end_ ? (_start_ + 0) : _start_ }; \ 137 if (_start_ + 1 < _end_) { \ 138 enum { _it_ = (_start_ + 1) < _end_ ? (_start_ + 1) : _start_ }; \ 141 if (_start_ + 2 < _end_) { \ 142 enum { _it_ = (_start_ + 2) < _end_ ? (_start_ + 2) : _start_ }; \ 145 if (_start_ + 3 < _end_) { \ 146 enum { _it_ = (_start_ + 3) < _end_ ? (_start_ + 3) : _start_ }; \ 153 #define MAY_ALIAS __attribute__((__may_alias__)) 158 #if defined(__GNUC__) && __GNUC__ - 0 >= 3 159 #define ISLIKELY(x) __builtin_expect(!!(x), 1) 160 #define ISUNLIKELY(x) __builtin_expect(!!(x), 0) 162 #define ISLIKELY(x) (x) 163 #define ISUNLIKELY(x) (x)