| 1 | /* Copyright (c) 2014-2017 Apple, Inc. All rights reserved. |
| 2 | * |
| 3 | * The interfaces declared in this header provide conversions between vector |
| 4 | * types. The following functions are available: |
| 5 | * |
| 6 | * simd_char(x) simd_uchar(x) |
| 7 | * simd_short(x) simd_ushort(x) |
| 8 | * simd_int(x) simd_uint(x) |
| 9 | * simd_long(x) simd_ulong(x) |
| 10 | * simd_float(x) |
| 11 | * simd_double(x) |
| 12 | * |
| 13 | * Each of these functions converts x to a vector whose elements have the |
| 14 | * type named by the function, with the same number of elements as x. Unlike |
| 15 | * a vector cast, these functions convert the elements to the new element |
| 16 | * type. These conversions behave exactly as C scalar conversions, except |
| 17 | * that conversions from integer vector types to signed integer vector types |
| 18 | * are guaranteed to wrap modulo 2^N (where N is the number of bits in an |
| 19 | * element of the result type). |
| 20 | * |
| 21 | * In C++ the conversion functions are templated in the simd:: namespace. |
| 22 | * |
| 23 | * C++ Function Equivalent C Function |
| 24 | * ------------------------------------------------------------------- |
| 25 | * simd::convert<ScalarType>(x) simd_ScalarType(x) |
| 26 | * simd::convert_sat<ScalarType>(x) simd_ScalarType_sat(x) |
| 27 | * |
| 28 | * For integer vector types, saturating conversions are also available: |
| 29 | * |
| 30 | * simd_char_sat(x) simd_uchar_sat(x) |
| 31 | * simd_short_sat(x) simd_ushort_sat(x) |
| 32 | * simd_int_sat(x) simd_uint_sat(x) |
| 33 | * simd_long_sat(x) simd_ulong_sat(x) |
| 34 | * |
| 35 | * These conversions clamp x to the representable range of the result type |
| 36 | * before converting. |
| 37 | * |
| 38 | * As well as round to nearest even conversions for same-width data types: |
| 39 | * |
| 40 | * simd_short_rte(simd_half<N> x) simd_ushort_rte(simd_half<N> x) |
| 41 | * simd_int_rte(simd_float<N> x) simd_uint_rte(simd_float<N> x) |
| 42 | * simd_long_rte(simd_double<N> x) simd_ulong_rte(simd_double<N> x) |
| 43 | * |
| 44 | * Unlike most vector operations in <simd/>, there are no abbreviated C++ |
| 45 | * names for these functions in the simd:: namespace. |
| 46 | */ |
| 47 | |
| 48 | #ifndef __SIMD_CONVERSION_HEADER__ |
| 49 | #define __SIMD_CONVERSION_HEADER__ |
| 50 | |
| 51 | #include <simd/base.h> |
| 52 | #if SIMD_COMPILER_HAS_REQUIRED_FEATURES |
| 53 | #include <simd/vector_types.h> |
| 54 | #include <simd/common.h> |
| 55 | #include <simd/logic.h> |
| 56 | |
| 57 | #ifdef __cplusplus |
| 58 | extern "C" { |
| 59 | #endif |
| 60 | |
| 61 | static simd_char2 SIMD_CFUNC simd_char(simd_char2 __x); |
| 62 | static simd_char3 SIMD_CFUNC simd_char(simd_char3 __x); |
| 63 | static simd_char4 SIMD_CFUNC simd_char(simd_char4 __x); |
| 64 | static simd_char8 SIMD_CFUNC simd_char(simd_char8 __x); |
| 65 | static simd_char16 SIMD_CFUNC simd_char(simd_char16 __x); |
| 66 | static simd_char32 SIMD_CFUNC simd_char(simd_char32 __x); |
| 67 | static simd_char2 SIMD_CFUNC simd_char(simd_uchar2 __x); |
| 68 | static simd_char3 SIMD_CFUNC simd_char(simd_uchar3 __x); |
| 69 | static simd_char4 SIMD_CFUNC simd_char(simd_uchar4 __x); |
| 70 | static simd_char8 SIMD_CFUNC simd_char(simd_uchar8 __x); |
| 71 | static simd_char16 SIMD_CFUNC simd_char(simd_uchar16 __x); |
| 72 | static simd_char32 SIMD_CFUNC simd_char(simd_uchar32 __x); |
| 73 | static simd_char2 SIMD_CFUNC simd_char(simd_short2 __x); |
| 74 | static simd_char3 SIMD_CFUNC simd_char(simd_short3 __x); |
| 75 | static simd_char4 SIMD_CFUNC simd_char(simd_short4 __x); |
| 76 | static simd_char8 SIMD_CFUNC simd_char(simd_short8 __x); |
| 77 | static simd_char16 SIMD_CFUNC simd_char(simd_short16 __x); |
| 78 | static simd_char32 SIMD_CFUNC simd_char(simd_short32 __x); |
| 79 | static simd_char2 SIMD_CFUNC simd_char(simd_ushort2 __x); |
| 80 | static simd_char3 SIMD_CFUNC simd_char(simd_ushort3 __x); |
| 81 | static simd_char4 SIMD_CFUNC simd_char(simd_ushort4 __x); |
| 82 | static simd_char8 SIMD_CFUNC simd_char(simd_ushort8 __x); |
| 83 | static simd_char16 SIMD_CFUNC simd_char(simd_ushort16 __x); |
| 84 | static simd_char32 SIMD_CFUNC simd_char(simd_ushort32 __x); |
| 85 | static simd_char2 SIMD_CFUNC simd_char(simd_half2 __x); |
| 86 | static simd_char3 SIMD_CFUNC simd_char(simd_half3 __x); |
| 87 | static simd_char4 SIMD_CFUNC simd_char(simd_half4 __x); |
| 88 | static simd_char8 SIMD_CFUNC simd_char(simd_half8 __x); |
| 89 | static simd_char16 SIMD_CFUNC simd_char(simd_half16 __x); |
| 90 | static simd_char32 SIMD_CFUNC simd_char(simd_half32 __x); |
| 91 | static simd_char2 SIMD_CFUNC simd_char(simd_int2 __x); |
| 92 | static simd_char3 SIMD_CFUNC simd_char(simd_int3 __x); |
| 93 | static simd_char4 SIMD_CFUNC simd_char(simd_int4 __x); |
| 94 | static simd_char8 SIMD_CFUNC simd_char(simd_int8 __x); |
| 95 | static simd_char16 SIMD_CFUNC simd_char(simd_int16 __x); |
| 96 | static simd_char2 SIMD_CFUNC simd_char(simd_uint2 __x); |
| 97 | static simd_char3 SIMD_CFUNC simd_char(simd_uint3 __x); |
| 98 | static simd_char4 SIMD_CFUNC simd_char(simd_uint4 __x); |
| 99 | static simd_char8 SIMD_CFUNC simd_char(simd_uint8 __x); |
| 100 | static simd_char16 SIMD_CFUNC simd_char(simd_uint16 __x); |
| 101 | static simd_char2 SIMD_CFUNC simd_char(simd_float2 __x); |
| 102 | static simd_char3 SIMD_CFUNC simd_char(simd_float3 __x); |
| 103 | static simd_char4 SIMD_CFUNC simd_char(simd_float4 __x); |
| 104 | static simd_char8 SIMD_CFUNC simd_char(simd_float8 __x); |
| 105 | static simd_char16 SIMD_CFUNC simd_char(simd_float16 __x); |
| 106 | static simd_char2 SIMD_CFUNC simd_char(simd_long2 __x); |
| 107 | static simd_char3 SIMD_CFUNC simd_char(simd_long3 __x); |
| 108 | static simd_char4 SIMD_CFUNC simd_char(simd_long4 __x); |
| 109 | static simd_char8 SIMD_CFUNC simd_char(simd_long8 __x); |
| 110 | static simd_char2 SIMD_CFUNC simd_char(simd_ulong2 __x); |
| 111 | static simd_char3 SIMD_CFUNC simd_char(simd_ulong3 __x); |
| 112 | static simd_char4 SIMD_CFUNC simd_char(simd_ulong4 __x); |
| 113 | static simd_char8 SIMD_CFUNC simd_char(simd_ulong8 __x); |
| 114 | static simd_char2 SIMD_CFUNC simd_char(simd_double2 __x); |
| 115 | static simd_char3 SIMD_CFUNC simd_char(simd_double3 __x); |
| 116 | static simd_char4 SIMD_CFUNC simd_char(simd_double4 __x); |
| 117 | static simd_char8 SIMD_CFUNC simd_char(simd_double8 __x); |
| 118 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_char2 __x); |
| 119 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_char3 __x); |
| 120 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_char4 __x); |
| 121 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_char8 __x); |
| 122 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_char16 __x); |
| 123 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_char32 __x); |
| 124 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_short2 __x); |
| 125 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_short3 __x); |
| 126 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_short4 __x); |
| 127 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_short8 __x); |
| 128 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_short16 __x); |
| 129 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_short32 __x); |
| 130 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_half2 __x); |
| 131 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_half3 __x); |
| 132 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_half4 __x); |
| 133 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_half8 __x); |
| 134 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_half16 __x); |
| 135 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_half32 __x); |
| 136 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_int2 __x); |
| 137 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_int3 __x); |
| 138 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_int4 __x); |
| 139 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_int8 __x); |
| 140 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_int16 __x); |
| 141 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_float2 __x); |
| 142 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_float3 __x); |
| 143 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_float4 __x); |
| 144 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_float8 __x); |
| 145 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_float16 __x); |
| 146 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_long2 __x); |
| 147 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_long3 __x); |
| 148 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_long4 __x); |
| 149 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_long8 __x); |
| 150 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_double2 __x); |
| 151 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_double3 __x); |
| 152 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_double4 __x); |
| 153 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_double8 __x); |
| 154 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_uchar2 __x); |
| 155 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_uchar3 __x); |
| 156 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_uchar4 __x); |
| 157 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_uchar8 __x); |
| 158 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_uchar16 __x); |
| 159 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_uchar32 __x); |
| 160 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_ushort2 __x); |
| 161 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_ushort3 __x); |
| 162 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_ushort4 __x); |
| 163 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_ushort8 __x); |
| 164 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_ushort16 __x); |
| 165 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_ushort32 __x); |
| 166 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_uint2 __x); |
| 167 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_uint3 __x); |
| 168 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_uint4 __x); |
| 169 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_uint8 __x); |
| 170 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_uint16 __x); |
| 171 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_ulong2 __x); |
| 172 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_ulong3 __x); |
| 173 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_ulong4 __x); |
| 174 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_ulong8 __x); |
| 175 | #define vector_char simd_char |
| 176 | #define vector_char_sat simd_char_sat |
| 177 | |
| 178 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_char2 __x); |
| 179 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_char3 __x); |
| 180 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_char4 __x); |
| 181 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_char8 __x); |
| 182 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_char16 __x); |
| 183 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_char32 __x); |
| 184 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_uchar2 __x); |
| 185 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_uchar3 __x); |
| 186 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_uchar4 __x); |
| 187 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_uchar8 __x); |
| 188 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_uchar16 __x); |
| 189 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_uchar32 __x); |
| 190 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_short2 __x); |
| 191 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_short3 __x); |
| 192 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_short4 __x); |
| 193 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_short8 __x); |
| 194 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_short16 __x); |
| 195 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_short32 __x); |
| 196 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_ushort2 __x); |
| 197 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_ushort3 __x); |
| 198 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_ushort4 __x); |
| 199 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_ushort8 __x); |
| 200 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_ushort16 __x); |
| 201 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_ushort32 __x); |
| 202 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_half2 __x); |
| 203 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_half3 __x); |
| 204 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_half4 __x); |
| 205 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_half8 __x); |
| 206 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_half16 __x); |
| 207 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_half32 __x); |
| 208 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_int2 __x); |
| 209 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_int3 __x); |
| 210 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_int4 __x); |
| 211 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_int8 __x); |
| 212 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_int16 __x); |
| 213 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_uint2 __x); |
| 214 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_uint3 __x); |
| 215 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_uint4 __x); |
| 216 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_uint8 __x); |
| 217 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_uint16 __x); |
| 218 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_float2 __x); |
| 219 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_float3 __x); |
| 220 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_float4 __x); |
| 221 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_float8 __x); |
| 222 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_float16 __x); |
| 223 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_long2 __x); |
| 224 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_long3 __x); |
| 225 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_long4 __x); |
| 226 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_long8 __x); |
| 227 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_ulong2 __x); |
| 228 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_ulong3 __x); |
| 229 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_ulong4 __x); |
| 230 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_ulong8 __x); |
| 231 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_double2 __x); |
| 232 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_double3 __x); |
| 233 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_double4 __x); |
| 234 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_double8 __x); |
| 235 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_char2 __x); |
| 236 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_char3 __x); |
| 237 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_char4 __x); |
| 238 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_char8 __x); |
| 239 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_char16 __x); |
| 240 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_char32 __x); |
| 241 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_short2 __x); |
| 242 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_short3 __x); |
| 243 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_short4 __x); |
| 244 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_short8 __x); |
| 245 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_short16 __x); |
| 246 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_short32 __x); |
| 247 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_half2 __x); |
| 248 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_half3 __x); |
| 249 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_half4 __x); |
| 250 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_half8 __x); |
| 251 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_half16 __x); |
| 252 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_half32 __x); |
| 253 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_int2 __x); |
| 254 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_int3 __x); |
| 255 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_int4 __x); |
| 256 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_int8 __x); |
| 257 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_int16 __x); |
| 258 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_float2 __x); |
| 259 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_float3 __x); |
| 260 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_float4 __x); |
| 261 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_float8 __x); |
| 262 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_float16 __x); |
| 263 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_long2 __x); |
| 264 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_long3 __x); |
| 265 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_long4 __x); |
| 266 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_long8 __x); |
| 267 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_double2 __x); |
| 268 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_double3 __x); |
| 269 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_double4 __x); |
| 270 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_double8 __x); |
| 271 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_uchar2 __x); |
| 272 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_uchar3 __x); |
| 273 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_uchar4 __x); |
| 274 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_uchar8 __x); |
| 275 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_uchar16 __x); |
| 276 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_uchar32 __x); |
| 277 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_ushort2 __x); |
| 278 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_ushort3 __x); |
| 279 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_ushort4 __x); |
| 280 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_ushort8 __x); |
| 281 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_ushort16 __x); |
| 282 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_ushort32 __x); |
| 283 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_uint2 __x); |
| 284 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_uint3 __x); |
| 285 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_uint4 __x); |
| 286 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_uint8 __x); |
| 287 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_uint16 __x); |
| 288 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_ulong2 __x); |
| 289 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_ulong3 __x); |
| 290 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_ulong4 __x); |
| 291 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_ulong8 __x); |
| 292 | #define vector_uchar simd_uchar |
| 293 | #define vector_uchar_sat simd_uchar_sat |
| 294 | |
| 295 | static simd_short2 SIMD_CFUNC simd_short(simd_char2 __x); |
| 296 | static simd_short3 SIMD_CFUNC simd_short(simd_char3 __x); |
| 297 | static simd_short4 SIMD_CFUNC simd_short(simd_char4 __x); |
| 298 | static simd_short8 SIMD_CFUNC simd_short(simd_char8 __x); |
| 299 | static simd_short16 SIMD_CFUNC simd_short(simd_char16 __x); |
| 300 | static simd_short32 SIMD_CFUNC simd_short(simd_char32 __x); |
| 301 | static simd_short2 SIMD_CFUNC simd_short(simd_uchar2 __x); |
| 302 | static simd_short3 SIMD_CFUNC simd_short(simd_uchar3 __x); |
| 303 | static simd_short4 SIMD_CFUNC simd_short(simd_uchar4 __x); |
| 304 | static simd_short8 SIMD_CFUNC simd_short(simd_uchar8 __x); |
| 305 | static simd_short16 SIMD_CFUNC simd_short(simd_uchar16 __x); |
| 306 | static simd_short32 SIMD_CFUNC simd_short(simd_uchar32 __x); |
| 307 | static simd_short2 SIMD_CFUNC simd_short(simd_short2 __x); |
| 308 | static simd_short3 SIMD_CFUNC simd_short(simd_short3 __x); |
| 309 | static simd_short4 SIMD_CFUNC simd_short(simd_short4 __x); |
| 310 | static simd_short8 SIMD_CFUNC simd_short(simd_short8 __x); |
| 311 | static simd_short16 SIMD_CFUNC simd_short(simd_short16 __x); |
| 312 | static simd_short32 SIMD_CFUNC simd_short(simd_short32 __x); |
| 313 | static simd_short2 SIMD_CFUNC simd_short(simd_ushort2 __x); |
| 314 | static simd_short3 SIMD_CFUNC simd_short(simd_ushort3 __x); |
| 315 | static simd_short4 SIMD_CFUNC simd_short(simd_ushort4 __x); |
| 316 | static simd_short8 SIMD_CFUNC simd_short(simd_ushort8 __x); |
| 317 | static simd_short16 SIMD_CFUNC simd_short(simd_ushort16 __x); |
| 318 | static simd_short32 SIMD_CFUNC simd_short(simd_ushort32 __x); |
| 319 | static simd_short2 SIMD_CFUNC simd_short(simd_half2 __x); |
| 320 | static simd_short3 SIMD_CFUNC simd_short(simd_half3 __x); |
| 321 | static simd_short4 SIMD_CFUNC simd_short(simd_half4 __x); |
| 322 | static simd_short8 SIMD_CFUNC simd_short(simd_half8 __x); |
| 323 | static simd_short16 SIMD_CFUNC simd_short(simd_half16 __x); |
| 324 | static simd_short32 SIMD_CFUNC simd_short(simd_half32 __x); |
| 325 | static simd_short2 SIMD_CFUNC simd_short(simd_int2 __x); |
| 326 | static simd_short3 SIMD_CFUNC simd_short(simd_int3 __x); |
| 327 | static simd_short4 SIMD_CFUNC simd_short(simd_int4 __x); |
| 328 | static simd_short8 SIMD_CFUNC simd_short(simd_int8 __x); |
| 329 | static simd_short16 SIMD_CFUNC simd_short(simd_int16 __x); |
| 330 | static simd_short2 SIMD_CFUNC simd_short(simd_uint2 __x); |
| 331 | static simd_short3 SIMD_CFUNC simd_short(simd_uint3 __x); |
| 332 | static simd_short4 SIMD_CFUNC simd_short(simd_uint4 __x); |
| 333 | static simd_short8 SIMD_CFUNC simd_short(simd_uint8 __x); |
| 334 | static simd_short16 SIMD_CFUNC simd_short(simd_uint16 __x); |
| 335 | static simd_short2 SIMD_CFUNC simd_short(simd_float2 __x); |
| 336 | static simd_short3 SIMD_CFUNC simd_short(simd_float3 __x); |
| 337 | static simd_short4 SIMD_CFUNC simd_short(simd_float4 __x); |
| 338 | static simd_short8 SIMD_CFUNC simd_short(simd_float8 __x); |
| 339 | static simd_short16 SIMD_CFUNC simd_short(simd_float16 __x); |
| 340 | static simd_short2 SIMD_CFUNC simd_short(simd_long2 __x); |
| 341 | static simd_short3 SIMD_CFUNC simd_short(simd_long3 __x); |
| 342 | static simd_short4 SIMD_CFUNC simd_short(simd_long4 __x); |
| 343 | static simd_short8 SIMD_CFUNC simd_short(simd_long8 __x); |
| 344 | static simd_short2 SIMD_CFUNC simd_short(simd_ulong2 __x); |
| 345 | static simd_short3 SIMD_CFUNC simd_short(simd_ulong3 __x); |
| 346 | static simd_short4 SIMD_CFUNC simd_short(simd_ulong4 __x); |
| 347 | static simd_short8 SIMD_CFUNC simd_short(simd_ulong8 __x); |
| 348 | static simd_short2 SIMD_CFUNC simd_short(simd_double2 __x); |
| 349 | static simd_short3 SIMD_CFUNC simd_short(simd_double3 __x); |
| 350 | static simd_short4 SIMD_CFUNC simd_short(simd_double4 __x); |
| 351 | static simd_short8 SIMD_CFUNC simd_short(simd_double8 __x); |
| 352 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_char2 __x); |
| 353 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_char3 __x); |
| 354 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_char4 __x); |
| 355 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_char8 __x); |
| 356 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_char16 __x); |
| 357 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_char32 __x); |
| 358 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_short2 __x); |
| 359 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_short3 __x); |
| 360 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_short4 __x); |
| 361 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_short8 __x); |
| 362 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_short16 __x); |
| 363 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_short32 __x); |
| 364 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_half2 __x); |
| 365 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_half3 __x); |
| 366 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_half4 __x); |
| 367 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_half8 __x); |
| 368 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_half16 __x); |
| 369 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_half32 __x); |
| 370 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_int2 __x); |
| 371 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_int3 __x); |
| 372 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_int4 __x); |
| 373 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_int8 __x); |
| 374 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_int16 __x); |
| 375 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_float2 __x); |
| 376 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_float3 __x); |
| 377 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_float4 __x); |
| 378 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_float8 __x); |
| 379 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_float16 __x); |
| 380 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_long2 __x); |
| 381 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_long3 __x); |
| 382 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_long4 __x); |
| 383 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_long8 __x); |
| 384 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_double2 __x); |
| 385 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_double3 __x); |
| 386 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_double4 __x); |
| 387 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_double8 __x); |
| 388 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_uchar2 __x); |
| 389 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_uchar3 __x); |
| 390 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_uchar4 __x); |
| 391 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_uchar8 __x); |
| 392 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_uchar16 __x); |
| 393 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_uchar32 __x); |
| 394 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_ushort2 __x); |
| 395 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_ushort3 __x); |
| 396 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_ushort4 __x); |
| 397 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_ushort8 __x); |
| 398 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_ushort16 __x); |
| 399 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_ushort32 __x); |
| 400 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_uint2 __x); |
| 401 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_uint3 __x); |
| 402 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_uint4 __x); |
| 403 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_uint8 __x); |
| 404 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_uint16 __x); |
| 405 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_ulong2 __x); |
| 406 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_ulong3 __x); |
| 407 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_ulong4 __x); |
| 408 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_ulong8 __x); |
| 409 | static simd_short2 SIMD_CFUNC simd_short_rte(simd_half2 __x); |
| 410 | static simd_short3 SIMD_CFUNC simd_short_rte(simd_half3 __x); |
| 411 | static simd_short4 SIMD_CFUNC simd_short_rte(simd_half4 __x); |
| 412 | static simd_short8 SIMD_CFUNC simd_short_rte(simd_half8 __x); |
| 413 | static simd_short16 SIMD_CFUNC simd_short_rte(simd_half16 __x); |
| 414 | static simd_short32 SIMD_CFUNC simd_short_rte(simd_half32 __x); |
| 415 | #define vector_short simd_short |
| 416 | #define vector_short_sat simd_short_sat |
| 417 | |
| 418 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_char2 __x); |
| 419 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_char3 __x); |
| 420 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_char4 __x); |
| 421 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_char8 __x); |
| 422 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_char16 __x); |
| 423 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_char32 __x); |
| 424 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_uchar2 __x); |
| 425 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_uchar3 __x); |
| 426 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_uchar4 __x); |
| 427 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_uchar8 __x); |
| 428 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_uchar16 __x); |
| 429 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_uchar32 __x); |
| 430 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_short2 __x); |
| 431 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_short3 __x); |
| 432 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_short4 __x); |
| 433 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_short8 __x); |
| 434 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_short16 __x); |
| 435 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_short32 __x); |
| 436 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_ushort2 __x); |
| 437 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_ushort3 __x); |
| 438 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_ushort4 __x); |
| 439 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_ushort8 __x); |
| 440 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_ushort16 __x); |
| 441 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_ushort32 __x); |
| 442 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_half2 __x); |
| 443 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_half3 __x); |
| 444 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_half4 __x); |
| 445 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_half8 __x); |
| 446 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_half16 __x); |
| 447 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_half32 __x); |
| 448 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_int2 __x); |
| 449 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_int3 __x); |
| 450 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_int4 __x); |
| 451 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_int8 __x); |
| 452 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_int16 __x); |
| 453 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_uint2 __x); |
| 454 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_uint3 __x); |
| 455 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_uint4 __x); |
| 456 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_uint8 __x); |
| 457 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_uint16 __x); |
| 458 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_float2 __x); |
| 459 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_float3 __x); |
| 460 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_float4 __x); |
| 461 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_float8 __x); |
| 462 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_float16 __x); |
| 463 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_long2 __x); |
| 464 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_long3 __x); |
| 465 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_long4 __x); |
| 466 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_long8 __x); |
| 467 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_ulong2 __x); |
| 468 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_ulong3 __x); |
| 469 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_ulong4 __x); |
| 470 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_ulong8 __x); |
| 471 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_double2 __x); |
| 472 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_double3 __x); |
| 473 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_double4 __x); |
| 474 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_double8 __x); |
| 475 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_char2 __x); |
| 476 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_char3 __x); |
| 477 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_char4 __x); |
| 478 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_char8 __x); |
| 479 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_char16 __x); |
| 480 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_char32 __x); |
| 481 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_short2 __x); |
| 482 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_short3 __x); |
| 483 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_short4 __x); |
| 484 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_short8 __x); |
| 485 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_short16 __x); |
| 486 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_short32 __x); |
| 487 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_half2 __x); |
| 488 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_half3 __x); |
| 489 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_half4 __x); |
| 490 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_half8 __x); |
| 491 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_half16 __x); |
| 492 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_half32 __x); |
| 493 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_int2 __x); |
| 494 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_int3 __x); |
| 495 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_int4 __x); |
| 496 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_int8 __x); |
| 497 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_int16 __x); |
| 498 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_float2 __x); |
| 499 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_float3 __x); |
| 500 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_float4 __x); |
| 501 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_float8 __x); |
| 502 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_float16 __x); |
| 503 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_long2 __x); |
| 504 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_long3 __x); |
| 505 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_long4 __x); |
| 506 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_long8 __x); |
| 507 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_double2 __x); |
| 508 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_double3 __x); |
| 509 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_double4 __x); |
| 510 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_double8 __x); |
| 511 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_uchar2 __x); |
| 512 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_uchar3 __x); |
| 513 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_uchar4 __x); |
| 514 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_uchar8 __x); |
| 515 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_uchar16 __x); |
| 516 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_uchar32 __x); |
| 517 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_ushort2 __x); |
| 518 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_ushort3 __x); |
| 519 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_ushort4 __x); |
| 520 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_ushort8 __x); |
| 521 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_ushort16 __x); |
| 522 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_ushort32 __x); |
| 523 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_uint2 __x); |
| 524 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_uint3 __x); |
| 525 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_uint4 __x); |
| 526 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_uint8 __x); |
| 527 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_uint16 __x); |
| 528 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_ulong2 __x); |
| 529 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_ulong3 __x); |
| 530 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_ulong4 __x); |
| 531 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_ulong8 __x); |
| 532 | static simd_ushort2 SIMD_CFUNC simd_ushort_rte(simd_half2 __x); |
| 533 | static simd_ushort3 SIMD_CFUNC simd_ushort_rte(simd_half3 __x); |
| 534 | static simd_ushort4 SIMD_CFUNC simd_ushort_rte(simd_half4 __x); |
| 535 | static simd_ushort8 SIMD_CFUNC simd_ushort_rte(simd_half8 __x); |
| 536 | static simd_ushort16 SIMD_CFUNC simd_ushort_rte(simd_half16 __x); |
| 537 | static simd_ushort32 SIMD_CFUNC simd_ushort_rte(simd_half32 __x); |
| 538 | #define vector_ushort simd_ushort |
| 539 | #define vector_ushort_sat simd_ushort_sat |
| 540 | |
| 541 | static simd_half2 SIMD_CFUNC simd_half(simd_char2 __x); |
| 542 | static simd_half3 SIMD_CFUNC simd_half(simd_char3 __x); |
| 543 | static simd_half4 SIMD_CFUNC simd_half(simd_char4 __x); |
| 544 | static simd_half8 SIMD_CFUNC simd_half(simd_char8 __x); |
| 545 | static simd_half16 SIMD_CFUNC simd_half(simd_char16 __x); |
| 546 | static simd_half2 SIMD_CFUNC simd_half(simd_uchar2 __x); |
| 547 | static simd_half3 SIMD_CFUNC simd_half(simd_uchar3 __x); |
| 548 | static simd_half4 SIMD_CFUNC simd_half(simd_uchar4 __x); |
| 549 | static simd_half8 SIMD_CFUNC simd_half(simd_uchar8 __x); |
| 550 | static simd_half16 SIMD_CFUNC simd_half(simd_uchar16 __x); |
| 551 | static simd_half2 SIMD_CFUNC simd_half(simd_short2 __x); |
| 552 | static simd_half3 SIMD_CFUNC simd_half(simd_short3 __x); |
| 553 | static simd_half4 SIMD_CFUNC simd_half(simd_short4 __x); |
| 554 | static simd_half8 SIMD_CFUNC simd_half(simd_short8 __x); |
| 555 | static simd_half16 SIMD_CFUNC simd_half(simd_short16 __x); |
| 556 | static simd_half2 SIMD_CFUNC simd_half(simd_ushort2 __x); |
| 557 | static simd_half3 SIMD_CFUNC simd_half(simd_ushort3 __x); |
| 558 | static simd_half4 SIMD_CFUNC simd_half(simd_ushort4 __x); |
| 559 | static simd_half8 SIMD_CFUNC simd_half(simd_ushort8 __x); |
| 560 | static simd_half16 SIMD_CFUNC simd_half(simd_ushort16 __x); |
| 561 | static simd_half2 SIMD_CFUNC simd_half(simd_half2 __x); |
| 562 | static simd_half3 SIMD_CFUNC simd_half(simd_half3 __x); |
| 563 | static simd_half4 SIMD_CFUNC simd_half(simd_half4 __x); |
| 564 | static simd_half8 SIMD_CFUNC simd_half(simd_half8 __x); |
| 565 | static simd_half16 SIMD_CFUNC simd_half(simd_half16 __x); |
| 566 | static simd_half2 SIMD_CFUNC simd_half(simd_int2 __x); |
| 567 | static simd_half3 SIMD_CFUNC simd_half(simd_int3 __x); |
| 568 | static simd_half4 SIMD_CFUNC simd_half(simd_int4 __x); |
| 569 | static simd_half8 SIMD_CFUNC simd_half(simd_int8 __x); |
| 570 | static simd_half16 SIMD_CFUNC simd_half(simd_int16 __x); |
| 571 | static simd_half2 SIMD_CFUNC simd_half(simd_uint2 __x); |
| 572 | static simd_half3 SIMD_CFUNC simd_half(simd_uint3 __x); |
| 573 | static simd_half4 SIMD_CFUNC simd_half(simd_uint4 __x); |
| 574 | static simd_half8 SIMD_CFUNC simd_half(simd_uint8 __x); |
| 575 | static simd_half16 SIMD_CFUNC simd_half(simd_uint16 __x); |
| 576 | static simd_half2 SIMD_CFUNC simd_half(simd_float2 __x); |
| 577 | static simd_half3 SIMD_CFUNC simd_half(simd_float3 __x); |
| 578 | static simd_half4 SIMD_CFUNC simd_half(simd_float4 __x); |
| 579 | static simd_half8 SIMD_CFUNC simd_half(simd_float8 __x); |
| 580 | static simd_half16 SIMD_CFUNC simd_half(simd_float16 __x); |
| 581 | static simd_half2 SIMD_CFUNC simd_half(simd_long2 __x); |
| 582 | static simd_half3 SIMD_CFUNC simd_half(simd_long3 __x); |
| 583 | static simd_half4 SIMD_CFUNC simd_half(simd_long4 __x); |
| 584 | static simd_half8 SIMD_CFUNC simd_half(simd_long8 __x); |
| 585 | static simd_half2 SIMD_CFUNC simd_half(simd_ulong2 __x); |
| 586 | static simd_half3 SIMD_CFUNC simd_half(simd_ulong3 __x); |
| 587 | static simd_half4 SIMD_CFUNC simd_half(simd_ulong4 __x); |
| 588 | static simd_half8 SIMD_CFUNC simd_half(simd_ulong8 __x); |
| 589 | static simd_half2 SIMD_CFUNC simd_half(simd_double2 __x); |
| 590 | static simd_half3 SIMD_CFUNC simd_half(simd_double3 __x); |
| 591 | static simd_half4 SIMD_CFUNC simd_half(simd_double4 __x); |
| 592 | static simd_half8 SIMD_CFUNC simd_half(simd_double8 __x); |
| 593 | |
| 594 | static simd_int2 SIMD_CFUNC simd_int(simd_char2 __x); |
| 595 | static simd_int3 SIMD_CFUNC simd_int(simd_char3 __x); |
| 596 | static simd_int4 SIMD_CFUNC simd_int(simd_char4 __x); |
| 597 | static simd_int8 SIMD_CFUNC simd_int(simd_char8 __x); |
| 598 | static simd_int16 SIMD_CFUNC simd_int(simd_char16 __x); |
| 599 | static simd_int2 SIMD_CFUNC simd_int(simd_uchar2 __x); |
| 600 | static simd_int3 SIMD_CFUNC simd_int(simd_uchar3 __x); |
| 601 | static simd_int4 SIMD_CFUNC simd_int(simd_uchar4 __x); |
| 602 | static simd_int8 SIMD_CFUNC simd_int(simd_uchar8 __x); |
| 603 | static simd_int16 SIMD_CFUNC simd_int(simd_uchar16 __x); |
| 604 | static simd_int2 SIMD_CFUNC simd_int(simd_short2 __x); |
| 605 | static simd_int3 SIMD_CFUNC simd_int(simd_short3 __x); |
| 606 | static simd_int4 SIMD_CFUNC simd_int(simd_short4 __x); |
| 607 | static simd_int8 SIMD_CFUNC simd_int(simd_short8 __x); |
| 608 | static simd_int16 SIMD_CFUNC simd_int(simd_short16 __x); |
| 609 | static simd_int2 SIMD_CFUNC simd_int(simd_ushort2 __x); |
| 610 | static simd_int3 SIMD_CFUNC simd_int(simd_ushort3 __x); |
| 611 | static simd_int4 SIMD_CFUNC simd_int(simd_ushort4 __x); |
| 612 | static simd_int8 SIMD_CFUNC simd_int(simd_ushort8 __x); |
| 613 | static simd_int16 SIMD_CFUNC simd_int(simd_ushort16 __x); |
| 614 | static simd_int2 SIMD_CFUNC simd_int(simd_half2 __x); |
| 615 | static simd_int3 SIMD_CFUNC simd_int(simd_half3 __x); |
| 616 | static simd_int4 SIMD_CFUNC simd_int(simd_half4 __x); |
| 617 | static simd_int8 SIMD_CFUNC simd_int(simd_half8 __x); |
| 618 | static simd_int16 SIMD_CFUNC simd_int(simd_half16 __x); |
| 619 | static simd_int2 SIMD_CFUNC simd_int(simd_int2 __x); |
| 620 | static simd_int3 SIMD_CFUNC simd_int(simd_int3 __x); |
| 621 | static simd_int4 SIMD_CFUNC simd_int(simd_int4 __x); |
| 622 | static simd_int8 SIMD_CFUNC simd_int(simd_int8 __x); |
| 623 | static simd_int16 SIMD_CFUNC simd_int(simd_int16 __x); |
| 624 | static simd_int2 SIMD_CFUNC simd_int(simd_uint2 __x); |
| 625 | static simd_int3 SIMD_CFUNC simd_int(simd_uint3 __x); |
| 626 | static simd_int4 SIMD_CFUNC simd_int(simd_uint4 __x); |
| 627 | static simd_int8 SIMD_CFUNC simd_int(simd_uint8 __x); |
| 628 | static simd_int16 SIMD_CFUNC simd_int(simd_uint16 __x); |
| 629 | static simd_int2 SIMD_CFUNC simd_int(simd_float2 __x); |
| 630 | static simd_int3 SIMD_CFUNC simd_int(simd_float3 __x); |
| 631 | static simd_int4 SIMD_CFUNC simd_int(simd_float4 __x); |
| 632 | static simd_int8 SIMD_CFUNC simd_int(simd_float8 __x); |
| 633 | static simd_int16 SIMD_CFUNC simd_int(simd_float16 __x); |
| 634 | static simd_int2 SIMD_CFUNC simd_int(simd_long2 __x); |
| 635 | static simd_int3 SIMD_CFUNC simd_int(simd_long3 __x); |
| 636 | static simd_int4 SIMD_CFUNC simd_int(simd_long4 __x); |
| 637 | static simd_int8 SIMD_CFUNC simd_int(simd_long8 __x); |
| 638 | static simd_int2 SIMD_CFUNC simd_int(simd_ulong2 __x); |
| 639 | static simd_int3 SIMD_CFUNC simd_int(simd_ulong3 __x); |
| 640 | static simd_int4 SIMD_CFUNC simd_int(simd_ulong4 __x); |
| 641 | static simd_int8 SIMD_CFUNC simd_int(simd_ulong8 __x); |
| 642 | static simd_int2 SIMD_CFUNC simd_int(simd_double2 __x); |
| 643 | static simd_int3 SIMD_CFUNC simd_int(simd_double3 __x); |
| 644 | static simd_int4 SIMD_CFUNC simd_int(simd_double4 __x); |
| 645 | static simd_int8 SIMD_CFUNC simd_int(simd_double8 __x); |
| 646 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_char2 __x); |
| 647 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_char3 __x); |
| 648 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_char4 __x); |
| 649 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_char8 __x); |
| 650 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_char16 __x); |
| 651 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_short2 __x); |
| 652 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_short3 __x); |
| 653 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_short4 __x); |
| 654 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_short8 __x); |
| 655 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_short16 __x); |
| 656 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_half2 __x); |
| 657 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_half3 __x); |
| 658 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_half4 __x); |
| 659 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_half8 __x); |
| 660 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_half16 __x); |
| 661 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_int2 __x); |
| 662 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_int3 __x); |
| 663 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_int4 __x); |
| 664 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_int8 __x); |
| 665 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_int16 __x); |
| 666 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_float2 __x); |
| 667 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_float3 __x); |
| 668 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_float4 __x); |
| 669 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_float8 __x); |
| 670 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_float16 __x); |
| 671 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_long2 __x); |
| 672 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_long3 __x); |
| 673 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_long4 __x); |
| 674 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_long8 __x); |
| 675 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_double2 __x); |
| 676 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_double3 __x); |
| 677 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_double4 __x); |
| 678 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_double8 __x); |
| 679 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_uchar2 __x); |
| 680 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_uchar3 __x); |
| 681 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_uchar4 __x); |
| 682 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_uchar8 __x); |
| 683 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_uchar16 __x); |
| 684 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_ushort2 __x); |
| 685 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_ushort3 __x); |
| 686 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_ushort4 __x); |
| 687 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_ushort8 __x); |
| 688 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_ushort16 __x); |
| 689 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_uint2 __x); |
| 690 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_uint3 __x); |
| 691 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_uint4 __x); |
| 692 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_uint8 __x); |
| 693 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_uint16 __x); |
| 694 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_ulong2 __x); |
| 695 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_ulong3 __x); |
| 696 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_ulong4 __x); |
| 697 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_ulong8 __x); |
| 698 | static simd_int2 SIMD_CFUNC simd_int_rte(simd_float2 __x); |
| 699 | static simd_int3 SIMD_CFUNC simd_int_rte(simd_float3 __x); |
| 700 | static simd_int4 SIMD_CFUNC simd_int_rte(simd_float4 __x); |
| 701 | static simd_int8 SIMD_CFUNC simd_int_rte(simd_float8 __x); |
| 702 | static simd_int16 SIMD_CFUNC simd_int_rte(simd_float16 __x); |
| 703 | #define vector_int simd_int |
| 704 | #define vector_int_sat simd_int_sat |
| 705 | |
| 706 | static simd_uint2 SIMD_CFUNC simd_uint(simd_char2 __x); |
| 707 | static simd_uint3 SIMD_CFUNC simd_uint(simd_char3 __x); |
| 708 | static simd_uint4 SIMD_CFUNC simd_uint(simd_char4 __x); |
| 709 | static simd_uint8 SIMD_CFUNC simd_uint(simd_char8 __x); |
| 710 | static simd_uint16 SIMD_CFUNC simd_uint(simd_char16 __x); |
| 711 | static simd_uint2 SIMD_CFUNC simd_uint(simd_uchar2 __x); |
| 712 | static simd_uint3 SIMD_CFUNC simd_uint(simd_uchar3 __x); |
| 713 | static simd_uint4 SIMD_CFUNC simd_uint(simd_uchar4 __x); |
| 714 | static simd_uint8 SIMD_CFUNC simd_uint(simd_uchar8 __x); |
| 715 | static simd_uint16 SIMD_CFUNC simd_uint(simd_uchar16 __x); |
| 716 | static simd_uint2 SIMD_CFUNC simd_uint(simd_short2 __x); |
| 717 | static simd_uint3 SIMD_CFUNC simd_uint(simd_short3 __x); |
| 718 | static simd_uint4 SIMD_CFUNC simd_uint(simd_short4 __x); |
| 719 | static simd_uint8 SIMD_CFUNC simd_uint(simd_short8 __x); |
| 720 | static simd_uint16 SIMD_CFUNC simd_uint(simd_short16 __x); |
| 721 | static simd_uint2 SIMD_CFUNC simd_uint(simd_ushort2 __x); |
| 722 | static simd_uint3 SIMD_CFUNC simd_uint(simd_ushort3 __x); |
| 723 | static simd_uint4 SIMD_CFUNC simd_uint(simd_ushort4 __x); |
| 724 | static simd_uint8 SIMD_CFUNC simd_uint(simd_ushort8 __x); |
| 725 | static simd_uint16 SIMD_CFUNC simd_uint(simd_ushort16 __x); |
| 726 | static simd_uint2 SIMD_CFUNC simd_uint(simd_half2 __x); |
| 727 | static simd_uint3 SIMD_CFUNC simd_uint(simd_half3 __x); |
| 728 | static simd_uint4 SIMD_CFUNC simd_uint(simd_half4 __x); |
| 729 | static simd_uint8 SIMD_CFUNC simd_uint(simd_half8 __x); |
| 730 | static simd_uint16 SIMD_CFUNC simd_uint(simd_half16 __x); |
| 731 | static simd_uint2 SIMD_CFUNC simd_uint(simd_int2 __x); |
| 732 | static simd_uint3 SIMD_CFUNC simd_uint(simd_int3 __x); |
| 733 | static simd_uint4 SIMD_CFUNC simd_uint(simd_int4 __x); |
| 734 | static simd_uint8 SIMD_CFUNC simd_uint(simd_int8 __x); |
| 735 | static simd_uint16 SIMD_CFUNC simd_uint(simd_int16 __x); |
| 736 | static simd_uint2 SIMD_CFUNC simd_uint(simd_uint2 __x); |
| 737 | static simd_uint3 SIMD_CFUNC simd_uint(simd_uint3 __x); |
| 738 | static simd_uint4 SIMD_CFUNC simd_uint(simd_uint4 __x); |
| 739 | static simd_uint8 SIMD_CFUNC simd_uint(simd_uint8 __x); |
| 740 | static simd_uint16 SIMD_CFUNC simd_uint(simd_uint16 __x); |
| 741 | static simd_uint2 SIMD_CFUNC simd_uint(simd_float2 __x); |
| 742 | static simd_uint3 SIMD_CFUNC simd_uint(simd_float3 __x); |
| 743 | static simd_uint4 SIMD_CFUNC simd_uint(simd_float4 __x); |
| 744 | static simd_uint8 SIMD_CFUNC simd_uint(simd_float8 __x); |
| 745 | static simd_uint16 SIMD_CFUNC simd_uint(simd_float16 __x); |
| 746 | static simd_uint2 SIMD_CFUNC simd_uint(simd_long2 __x); |
| 747 | static simd_uint3 SIMD_CFUNC simd_uint(simd_long3 __x); |
| 748 | static simd_uint4 SIMD_CFUNC simd_uint(simd_long4 __x); |
| 749 | static simd_uint8 SIMD_CFUNC simd_uint(simd_long8 __x); |
| 750 | static simd_uint2 SIMD_CFUNC simd_uint(simd_ulong2 __x); |
| 751 | static simd_uint3 SIMD_CFUNC simd_uint(simd_ulong3 __x); |
| 752 | static simd_uint4 SIMD_CFUNC simd_uint(simd_ulong4 __x); |
| 753 | static simd_uint8 SIMD_CFUNC simd_uint(simd_ulong8 __x); |
| 754 | static simd_uint2 SIMD_CFUNC simd_uint(simd_double2 __x); |
| 755 | static simd_uint3 SIMD_CFUNC simd_uint(simd_double3 __x); |
| 756 | static simd_uint4 SIMD_CFUNC simd_uint(simd_double4 __x); |
| 757 | static simd_uint8 SIMD_CFUNC simd_uint(simd_double8 __x); |
| 758 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_char2 __x); |
| 759 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_char3 __x); |
| 760 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_char4 __x); |
| 761 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_char8 __x); |
| 762 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_char16 __x); |
| 763 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_short2 __x); |
| 764 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_short3 __x); |
| 765 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_short4 __x); |
| 766 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_short8 __x); |
| 767 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_short16 __x); |
| 768 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_half2 __x); |
| 769 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_half3 __x); |
| 770 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_half4 __x); |
| 771 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_half8 __x); |
| 772 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_half16 __x); |
| 773 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_int2 __x); |
| 774 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_int3 __x); |
| 775 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_int4 __x); |
| 776 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_int8 __x); |
| 777 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_int16 __x); |
| 778 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_float2 __x); |
| 779 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_float3 __x); |
| 780 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_float4 __x); |
| 781 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_float8 __x); |
| 782 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_float16 __x); |
| 783 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_long2 __x); |
| 784 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_long3 __x); |
| 785 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_long4 __x); |
| 786 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_long8 __x); |
| 787 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_double2 __x); |
| 788 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_double3 __x); |
| 789 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_double4 __x); |
| 790 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_double8 __x); |
| 791 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_uchar2 __x); |
| 792 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_uchar3 __x); |
| 793 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_uchar4 __x); |
| 794 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_uchar8 __x); |
| 795 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_uchar16 __x); |
| 796 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_ushort2 __x); |
| 797 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_ushort3 __x); |
| 798 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_ushort4 __x); |
| 799 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_ushort8 __x); |
| 800 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_ushort16 __x); |
| 801 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_uint2 __x); |
| 802 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_uint3 __x); |
| 803 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_uint4 __x); |
| 804 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_uint8 __x); |
| 805 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_uint16 __x); |
| 806 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_ulong2 __x); |
| 807 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_ulong3 __x); |
| 808 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_ulong4 __x); |
| 809 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_ulong8 __x); |
| 810 | static simd_uint2 SIMD_CFUNC simd_uint_rte(simd_float2 __x); |
| 811 | static simd_uint3 SIMD_CFUNC simd_uint_rte(simd_float3 __x); |
| 812 | static simd_uint4 SIMD_CFUNC simd_uint_rte(simd_float4 __x); |
| 813 | static simd_uint8 SIMD_CFUNC simd_uint_rte(simd_float8 __x); |
| 814 | static simd_uint16 SIMD_CFUNC simd_uint_rte(simd_float16 __x); |
| 815 | #define vector_uint simd_uint |
| 816 | #define vector_uint_sat simd_uint_sat |
| 817 | |
| 818 | static simd_float2 SIMD_CFUNC simd_float(simd_char2 __x); |
| 819 | static simd_float3 SIMD_CFUNC simd_float(simd_char3 __x); |
| 820 | static simd_float4 SIMD_CFUNC simd_float(simd_char4 __x); |
| 821 | static simd_float8 SIMD_CFUNC simd_float(simd_char8 __x); |
| 822 | static simd_float16 SIMD_CFUNC simd_float(simd_char16 __x); |
| 823 | static simd_float2 SIMD_CFUNC simd_float(simd_uchar2 __x); |
| 824 | static simd_float3 SIMD_CFUNC simd_float(simd_uchar3 __x); |
| 825 | static simd_float4 SIMD_CFUNC simd_float(simd_uchar4 __x); |
| 826 | static simd_float8 SIMD_CFUNC simd_float(simd_uchar8 __x); |
| 827 | static simd_float16 SIMD_CFUNC simd_float(simd_uchar16 __x); |
| 828 | static simd_float2 SIMD_CFUNC simd_float(simd_short2 __x); |
| 829 | static simd_float3 SIMD_CFUNC simd_float(simd_short3 __x); |
| 830 | static simd_float4 SIMD_CFUNC simd_float(simd_short4 __x); |
| 831 | static simd_float8 SIMD_CFUNC simd_float(simd_short8 __x); |
| 832 | static simd_float16 SIMD_CFUNC simd_float(simd_short16 __x); |
| 833 | static simd_float2 SIMD_CFUNC simd_float(simd_ushort2 __x); |
| 834 | static simd_float3 SIMD_CFUNC simd_float(simd_ushort3 __x); |
| 835 | static simd_float4 SIMD_CFUNC simd_float(simd_ushort4 __x); |
| 836 | static simd_float8 SIMD_CFUNC simd_float(simd_ushort8 __x); |
| 837 | static simd_float16 SIMD_CFUNC simd_float(simd_ushort16 __x); |
| 838 | static simd_float2 SIMD_CFUNC simd_float(simd_half2 __x); |
| 839 | static simd_float3 SIMD_CFUNC simd_float(simd_half3 __x); |
| 840 | static simd_float4 SIMD_CFUNC simd_float(simd_half4 __x); |
| 841 | static simd_float8 SIMD_CFUNC simd_float(simd_half8 __x); |
| 842 | static simd_float16 SIMD_CFUNC simd_float(simd_half16 __x); |
| 843 | static simd_float2 SIMD_CFUNC simd_float(simd_int2 __x); |
| 844 | static simd_float3 SIMD_CFUNC simd_float(simd_int3 __x); |
| 845 | static simd_float4 SIMD_CFUNC simd_float(simd_int4 __x); |
| 846 | static simd_float8 SIMD_CFUNC simd_float(simd_int8 __x); |
| 847 | static simd_float16 SIMD_CFUNC simd_float(simd_int16 __x); |
| 848 | static simd_float2 SIMD_CFUNC simd_float(simd_uint2 __x); |
| 849 | static simd_float3 SIMD_CFUNC simd_float(simd_uint3 __x); |
| 850 | static simd_float4 SIMD_CFUNC simd_float(simd_uint4 __x); |
| 851 | static simd_float8 SIMD_CFUNC simd_float(simd_uint8 __x); |
| 852 | static simd_float16 SIMD_CFUNC simd_float(simd_uint16 __x); |
| 853 | static simd_float2 SIMD_CFUNC simd_float(simd_float2 __x); |
| 854 | static simd_float3 SIMD_CFUNC simd_float(simd_float3 __x); |
| 855 | static simd_float4 SIMD_CFUNC simd_float(simd_float4 __x); |
| 856 | static simd_float8 SIMD_CFUNC simd_float(simd_float8 __x); |
| 857 | static simd_float16 SIMD_CFUNC simd_float(simd_float16 __x); |
| 858 | static simd_float2 SIMD_CFUNC simd_float(simd_long2 __x); |
| 859 | static simd_float3 SIMD_CFUNC simd_float(simd_long3 __x); |
| 860 | static simd_float4 SIMD_CFUNC simd_float(simd_long4 __x); |
| 861 | static simd_float8 SIMD_CFUNC simd_float(simd_long8 __x); |
| 862 | static simd_float2 SIMD_CFUNC simd_float(simd_ulong2 __x); |
| 863 | static simd_float3 SIMD_CFUNC simd_float(simd_ulong3 __x); |
| 864 | static simd_float4 SIMD_CFUNC simd_float(simd_ulong4 __x); |
| 865 | static simd_float8 SIMD_CFUNC simd_float(simd_ulong8 __x); |
| 866 | static simd_float2 SIMD_CFUNC simd_float(simd_double2 __x); |
| 867 | static simd_float3 SIMD_CFUNC simd_float(simd_double3 __x); |
| 868 | static simd_float4 SIMD_CFUNC simd_float(simd_double4 __x); |
| 869 | static simd_float8 SIMD_CFUNC simd_float(simd_double8 __x); |
| 870 | #define vector_float simd_float |
| 871 | |
| 872 | static simd_long2 SIMD_CFUNC simd_long(simd_char2 __x); |
| 873 | static simd_long3 SIMD_CFUNC simd_long(simd_char3 __x); |
| 874 | static simd_long4 SIMD_CFUNC simd_long(simd_char4 __x); |
| 875 | static simd_long8 SIMD_CFUNC simd_long(simd_char8 __x); |
| 876 | static simd_long2 SIMD_CFUNC simd_long(simd_uchar2 __x); |
| 877 | static simd_long3 SIMD_CFUNC simd_long(simd_uchar3 __x); |
| 878 | static simd_long4 SIMD_CFUNC simd_long(simd_uchar4 __x); |
| 879 | static simd_long8 SIMD_CFUNC simd_long(simd_uchar8 __x); |
| 880 | static simd_long2 SIMD_CFUNC simd_long(simd_short2 __x); |
| 881 | static simd_long3 SIMD_CFUNC simd_long(simd_short3 __x); |
| 882 | static simd_long4 SIMD_CFUNC simd_long(simd_short4 __x); |
| 883 | static simd_long8 SIMD_CFUNC simd_long(simd_short8 __x); |
| 884 | static simd_long2 SIMD_CFUNC simd_long(simd_ushort2 __x); |
| 885 | static simd_long3 SIMD_CFUNC simd_long(simd_ushort3 __x); |
| 886 | static simd_long4 SIMD_CFUNC simd_long(simd_ushort4 __x); |
| 887 | static simd_long8 SIMD_CFUNC simd_long(simd_ushort8 __x); |
| 888 | static simd_long2 SIMD_CFUNC simd_long(simd_half2 __x); |
| 889 | static simd_long3 SIMD_CFUNC simd_long(simd_half3 __x); |
| 890 | static simd_long4 SIMD_CFUNC simd_long(simd_half4 __x); |
| 891 | static simd_long8 SIMD_CFUNC simd_long(simd_half8 __x); |
| 892 | static simd_long2 SIMD_CFUNC simd_long(simd_int2 __x); |
| 893 | static simd_long3 SIMD_CFUNC simd_long(simd_int3 __x); |
| 894 | static simd_long4 SIMD_CFUNC simd_long(simd_int4 __x); |
| 895 | static simd_long8 SIMD_CFUNC simd_long(simd_int8 __x); |
| 896 | static simd_long2 SIMD_CFUNC simd_long(simd_uint2 __x); |
| 897 | static simd_long3 SIMD_CFUNC simd_long(simd_uint3 __x); |
| 898 | static simd_long4 SIMD_CFUNC simd_long(simd_uint4 __x); |
| 899 | static simd_long8 SIMD_CFUNC simd_long(simd_uint8 __x); |
| 900 | static simd_long2 SIMD_CFUNC simd_long(simd_float2 __x); |
| 901 | static simd_long3 SIMD_CFUNC simd_long(simd_float3 __x); |
| 902 | static simd_long4 SIMD_CFUNC simd_long(simd_float4 __x); |
| 903 | static simd_long8 SIMD_CFUNC simd_long(simd_float8 __x); |
| 904 | static simd_long2 SIMD_CFUNC simd_long(simd_long2 __x); |
| 905 | static simd_long3 SIMD_CFUNC simd_long(simd_long3 __x); |
| 906 | static simd_long4 SIMD_CFUNC simd_long(simd_long4 __x); |
| 907 | static simd_long8 SIMD_CFUNC simd_long(simd_long8 __x); |
| 908 | static simd_long2 SIMD_CFUNC simd_long(simd_ulong2 __x); |
| 909 | static simd_long3 SIMD_CFUNC simd_long(simd_ulong3 __x); |
| 910 | static simd_long4 SIMD_CFUNC simd_long(simd_ulong4 __x); |
| 911 | static simd_long8 SIMD_CFUNC simd_long(simd_ulong8 __x); |
| 912 | static simd_long2 SIMD_CFUNC simd_long(simd_double2 __x); |
| 913 | static simd_long3 SIMD_CFUNC simd_long(simd_double3 __x); |
| 914 | static simd_long4 SIMD_CFUNC simd_long(simd_double4 __x); |
| 915 | static simd_long8 SIMD_CFUNC simd_long(simd_double8 __x); |
| 916 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_char2 __x); |
| 917 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_char3 __x); |
| 918 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_char4 __x); |
| 919 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_char8 __x); |
| 920 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_short2 __x); |
| 921 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_short3 __x); |
| 922 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_short4 __x); |
| 923 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_short8 __x); |
| 924 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_half2 __x); |
| 925 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_half3 __x); |
| 926 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_half4 __x); |
| 927 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_half8 __x); |
| 928 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_int2 __x); |
| 929 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_int3 __x); |
| 930 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_int4 __x); |
| 931 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_int8 __x); |
| 932 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_float2 __x); |
| 933 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_float3 __x); |
| 934 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_float4 __x); |
| 935 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_float8 __x); |
| 936 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_long2 __x); |
| 937 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_long3 __x); |
| 938 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_long4 __x); |
| 939 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_long8 __x); |
| 940 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_double2 __x); |
| 941 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_double3 __x); |
| 942 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_double4 __x); |
| 943 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_double8 __x); |
| 944 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_uchar2 __x); |
| 945 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_uchar3 __x); |
| 946 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_uchar4 __x); |
| 947 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_uchar8 __x); |
| 948 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_ushort2 __x); |
| 949 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_ushort3 __x); |
| 950 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_ushort4 __x); |
| 951 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_ushort8 __x); |
| 952 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_uint2 __x); |
| 953 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_uint3 __x); |
| 954 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_uint4 __x); |
| 955 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_uint8 __x); |
| 956 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_ulong2 __x); |
| 957 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_ulong3 __x); |
| 958 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_ulong4 __x); |
| 959 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_ulong8 __x); |
| 960 | static simd_long2 SIMD_CFUNC simd_long_rte(simd_double2 __x); |
| 961 | static simd_long3 SIMD_CFUNC simd_long_rte(simd_double3 __x); |
| 962 | static simd_long4 SIMD_CFUNC simd_long_rte(simd_double4 __x); |
| 963 | static simd_long8 SIMD_CFUNC simd_long_rte(simd_double8 __x); |
| 964 | #define vector_long simd_long |
| 965 | #define vector_long_sat simd_long_sat |
| 966 | |
| 967 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_char2 __x); |
| 968 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_char3 __x); |
| 969 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_char4 __x); |
| 970 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_char8 __x); |
| 971 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_uchar2 __x); |
| 972 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_uchar3 __x); |
| 973 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_uchar4 __x); |
| 974 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_uchar8 __x); |
| 975 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_short2 __x); |
| 976 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_short3 __x); |
| 977 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_short4 __x); |
| 978 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_short8 __x); |
| 979 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_ushort2 __x); |
| 980 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_ushort3 __x); |
| 981 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_ushort4 __x); |
| 982 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_ushort8 __x); |
| 983 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_half2 __x); |
| 984 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_half3 __x); |
| 985 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_half4 __x); |
| 986 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_half8 __x); |
| 987 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_int2 __x); |
| 988 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_int3 __x); |
| 989 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_int4 __x); |
| 990 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_int8 __x); |
| 991 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_uint2 __x); |
| 992 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_uint3 __x); |
| 993 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_uint4 __x); |
| 994 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_uint8 __x); |
| 995 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_float2 __x); |
| 996 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_float3 __x); |
| 997 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_float4 __x); |
| 998 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_float8 __x); |
| 999 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_long2 __x); |
| 1000 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_long3 __x); |
| 1001 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_long4 __x); |
| 1002 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_long8 __x); |
| 1003 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_ulong2 __x); |
| 1004 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_ulong3 __x); |
| 1005 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_ulong4 __x); |
| 1006 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_ulong8 __x); |
| 1007 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_double2 __x); |
| 1008 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_double3 __x); |
| 1009 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_double4 __x); |
| 1010 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_double8 __x); |
| 1011 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_char2 __x); |
| 1012 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_char3 __x); |
| 1013 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_char4 __x); |
| 1014 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_char8 __x); |
| 1015 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_short2 __x); |
| 1016 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_short3 __x); |
| 1017 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_short4 __x); |
| 1018 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_short8 __x); |
| 1019 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_half2 __x); |
| 1020 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_half3 __x); |
| 1021 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_half4 __x); |
| 1022 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_half8 __x); |
| 1023 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_int2 __x); |
| 1024 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_int3 __x); |
| 1025 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_int4 __x); |
| 1026 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_int8 __x); |
| 1027 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_float2 __x); |
| 1028 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_float3 __x); |
| 1029 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_float4 __x); |
| 1030 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_float8 __x); |
| 1031 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_long2 __x); |
| 1032 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_long3 __x); |
| 1033 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_long4 __x); |
| 1034 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_long8 __x); |
| 1035 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_double2 __x); |
| 1036 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_double3 __x); |
| 1037 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_double4 __x); |
| 1038 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_double8 __x); |
| 1039 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_uchar2 __x); |
| 1040 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_uchar3 __x); |
| 1041 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_uchar4 __x); |
| 1042 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_uchar8 __x); |
| 1043 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_ushort2 __x); |
| 1044 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_ushort3 __x); |
| 1045 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_ushort4 __x); |
| 1046 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_ushort8 __x); |
| 1047 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_uint2 __x); |
| 1048 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_uint3 __x); |
| 1049 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_uint4 __x); |
| 1050 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_uint8 __x); |
| 1051 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_ulong2 __x); |
| 1052 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_ulong3 __x); |
| 1053 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_ulong4 __x); |
| 1054 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_ulong8 __x); |
| 1055 | static simd_ulong2 SIMD_CFUNC simd_ulong_rte(simd_double2 __x); |
| 1056 | static simd_ulong3 SIMD_CFUNC simd_ulong_rte(simd_double3 __x); |
| 1057 | static simd_ulong4 SIMD_CFUNC simd_ulong_rte(simd_double4 __x); |
| 1058 | static simd_ulong8 SIMD_CFUNC simd_ulong_rte(simd_double8 __x); |
| 1059 | #define vector_ulong simd_ulong |
| 1060 | #define vector_ulong_sat simd_ulong_sat |
| 1061 | |
| 1062 | static simd_double2 SIMD_CFUNC simd_double(simd_char2 __x); |
| 1063 | static simd_double3 SIMD_CFUNC simd_double(simd_char3 __x); |
| 1064 | static simd_double4 SIMD_CFUNC simd_double(simd_char4 __x); |
| 1065 | static simd_double8 SIMD_CFUNC simd_double(simd_char8 __x); |
| 1066 | static simd_double2 SIMD_CFUNC simd_double(simd_uchar2 __x); |
| 1067 | static simd_double3 SIMD_CFUNC simd_double(simd_uchar3 __x); |
| 1068 | static simd_double4 SIMD_CFUNC simd_double(simd_uchar4 __x); |
| 1069 | static simd_double8 SIMD_CFUNC simd_double(simd_uchar8 __x); |
| 1070 | static simd_double2 SIMD_CFUNC simd_double(simd_short2 __x); |
| 1071 | static simd_double3 SIMD_CFUNC simd_double(simd_short3 __x); |
| 1072 | static simd_double4 SIMD_CFUNC simd_double(simd_short4 __x); |
| 1073 | static simd_double8 SIMD_CFUNC simd_double(simd_short8 __x); |
| 1074 | static simd_double2 SIMD_CFUNC simd_double(simd_ushort2 __x); |
| 1075 | static simd_double3 SIMD_CFUNC simd_double(simd_ushort3 __x); |
| 1076 | static simd_double4 SIMD_CFUNC simd_double(simd_ushort4 __x); |
| 1077 | static simd_double8 SIMD_CFUNC simd_double(simd_ushort8 __x); |
| 1078 | static simd_double2 SIMD_CFUNC simd_double(simd_half2 __x); |
| 1079 | static simd_double3 SIMD_CFUNC simd_double(simd_half3 __x); |
| 1080 | static simd_double4 SIMD_CFUNC simd_double(simd_half4 __x); |
| 1081 | static simd_double8 SIMD_CFUNC simd_double(simd_half8 __x); |
| 1082 | static simd_double2 SIMD_CFUNC simd_double(simd_int2 __x); |
| 1083 | static simd_double3 SIMD_CFUNC simd_double(simd_int3 __x); |
| 1084 | static simd_double4 SIMD_CFUNC simd_double(simd_int4 __x); |
| 1085 | static simd_double8 SIMD_CFUNC simd_double(simd_int8 __x); |
| 1086 | static simd_double2 SIMD_CFUNC simd_double(simd_uint2 __x); |
| 1087 | static simd_double3 SIMD_CFUNC simd_double(simd_uint3 __x); |
| 1088 | static simd_double4 SIMD_CFUNC simd_double(simd_uint4 __x); |
| 1089 | static simd_double8 SIMD_CFUNC simd_double(simd_uint8 __x); |
| 1090 | static simd_double2 SIMD_CFUNC simd_double(simd_float2 __x); |
| 1091 | static simd_double3 SIMD_CFUNC simd_double(simd_float3 __x); |
| 1092 | static simd_double4 SIMD_CFUNC simd_double(simd_float4 __x); |
| 1093 | static simd_double8 SIMD_CFUNC simd_double(simd_float8 __x); |
| 1094 | static simd_double2 SIMD_CFUNC simd_double(simd_long2 __x); |
| 1095 | static simd_double3 SIMD_CFUNC simd_double(simd_long3 __x); |
| 1096 | static simd_double4 SIMD_CFUNC simd_double(simd_long4 __x); |
| 1097 | static simd_double8 SIMD_CFUNC simd_double(simd_long8 __x); |
| 1098 | static simd_double2 SIMD_CFUNC simd_double(simd_ulong2 __x); |
| 1099 | static simd_double3 SIMD_CFUNC simd_double(simd_ulong3 __x); |
| 1100 | static simd_double4 SIMD_CFUNC simd_double(simd_ulong4 __x); |
| 1101 | static simd_double8 SIMD_CFUNC simd_double(simd_ulong8 __x); |
| 1102 | static simd_double2 SIMD_CFUNC simd_double(simd_double2 __x); |
| 1103 | static simd_double3 SIMD_CFUNC simd_double(simd_double3 __x); |
| 1104 | static simd_double4 SIMD_CFUNC simd_double(simd_double4 __x); |
| 1105 | static simd_double8 SIMD_CFUNC simd_double(simd_double8 __x); |
| 1106 | #define vector_double simd_double |
| 1107 | |
| 1108 | static simd_char2 SIMD_CFUNC vector2(char __x, char __y) { return ( simd_char2){__x, __y}; } |
| 1109 | static simd_uchar2 SIMD_CFUNC vector2(unsigned char __x, unsigned char __y) { return ( simd_uchar2){__x, __y}; } |
| 1110 | static simd_short2 SIMD_CFUNC vector2(short __x, short __y) { return ( simd_short2){__x, __y}; } |
| 1111 | static simd_ushort2 SIMD_CFUNC vector2(unsigned short __x, unsigned short __y) { return (simd_ushort2){__x, __y}; } |
| 1112 | static simd_half2 SIMD_CFUNC vector2(_Float16 __x, _Float16 __y) { return ( simd_half2){__x, __y}; } |
| 1113 | static simd_int2 SIMD_CFUNC vector2(int __x, int __y) { return ( simd_int2){__x, __y}; } |
| 1114 | static simd_uint2 SIMD_CFUNC vector2(unsigned int __x, unsigned int __y) { return ( simd_uint2){__x, __y}; } |
| 1115 | static simd_float2 SIMD_CFUNC vector2(float __x, float __y) { return ( simd_float2){__x, __y}; } |
| 1116 | static simd_long2 SIMD_CFUNC vector2(simd_long1 __x, simd_long1 __y) { return ( simd_long2){__x, __y}; } |
| 1117 | static simd_ulong2 SIMD_CFUNC vector2(simd_ulong1 __x, simd_ulong1 __y) { return ( simd_ulong2){__x, __y}; } |
| 1118 | static simd_double2 SIMD_CFUNC vector2(double __x, double __y) { return (simd_double2){__x, __y}; } |
| 1119 | |
| 1120 | static simd_char3 SIMD_CFUNC vector3(char __x, char __y, char __z) { return ( simd_char3){__x, __y, __z}; } |
| 1121 | static simd_uchar3 SIMD_CFUNC vector3(unsigned char __x, unsigned char __y, unsigned char __z) { return ( simd_uchar3){__x, __y, __z}; } |
| 1122 | static simd_short3 SIMD_CFUNC vector3(short __x, short __y, short __z) { return ( simd_short3){__x, __y, __z}; } |
| 1123 | static simd_ushort3 SIMD_CFUNC vector3(unsigned short __x, unsigned short __y, unsigned short __z) { return (simd_ushort3){__x, __y, __z}; } |
| 1124 | static simd_half3 SIMD_CFUNC vector3(_Float16 __x, _Float16 __y, _Float16 __z) { return ( simd_half3){__x, __y, __z}; } |
| 1125 | static simd_int3 SIMD_CFUNC vector3(int __x, int __y, int __z) { return ( simd_int3){__x, __y, __z}; } |
| 1126 | static simd_uint3 SIMD_CFUNC vector3(unsigned int __x, unsigned int __y, unsigned int __z) { return ( simd_uint3){__x, __y, __z}; } |
| 1127 | static simd_float3 SIMD_CFUNC vector3(float __x, float __y, float __z) { return ( simd_float3){__x, __y, __z}; } |
| 1128 | static simd_long3 SIMD_CFUNC vector3(simd_long1 __x, simd_long1 __y, simd_long1 __z) { return ( simd_long3){__x, __y, __z}; } |
| 1129 | static simd_ulong3 SIMD_CFUNC vector3(simd_ulong1 __x, simd_ulong1 __y, simd_ulong1 __z) { return ( simd_ulong3){__x, __y, __z}; } |
| 1130 | static simd_double3 SIMD_CFUNC vector3(double __x, double __y, double __z) { return (simd_double3){__x, __y, __z}; } |
| 1131 | |
| 1132 | static simd_char3 SIMD_CFUNC vector3(simd_char2 __xy, char __z) { simd_char3 __r; __r.xy = __xy; __r.z = __z; return __r; } |
| 1133 | static simd_uchar3 SIMD_CFUNC vector3(simd_uchar2 __xy, unsigned char __z) { simd_uchar3 __r; __r.xy = __xy; __r.z = __z; return __r; } |
| 1134 | static simd_short3 SIMD_CFUNC vector3(simd_short2 __xy, short __z) { simd_short3 __r; __r.xy = __xy; __r.z = __z; return __r; } |
| 1135 | static simd_ushort3 SIMD_CFUNC vector3(simd_ushort2 __xy, unsigned short __z) { simd_ushort3 __r; __r.xy = __xy; __r.z = __z; return __r; } |
| 1136 | static simd_half3 SIMD_CFUNC vector3(simd_half2 __xy, _Float16 __z) { simd_half3 __r; __r.xy = __xy; __r.z = __z; return __r; } |
| 1137 | static simd_int3 SIMD_CFUNC vector3(simd_int2 __xy, int __z) { simd_int3 __r; __r.xy = __xy; __r.z = __z; return __r; } |
| 1138 | static simd_uint3 SIMD_CFUNC vector3(simd_uint2 __xy, unsigned int __z) { simd_uint3 __r; __r.xy = __xy; __r.z = __z; return __r; } |
| 1139 | static simd_float3 SIMD_CFUNC vector3(simd_float2 __xy, float __z) { simd_float3 __r; __r.xy = __xy; __r.z = __z; return __r; } |
| 1140 | static simd_long3 SIMD_CFUNC vector3(simd_long2 __xy, simd_long1 __z) { simd_long3 __r; __r.xy = __xy; __r.z = __z; return __r; } |
| 1141 | static simd_ulong3 SIMD_CFUNC vector3(simd_ulong2 __xy, simd_ulong1 __z) { simd_ulong3 __r; __r.xy = __xy; __r.z = __z; return __r; } |
| 1142 | static simd_double3 SIMD_CFUNC vector3(simd_double2 __xy, double __z) { simd_double3 __r; __r.xy = __xy; __r.z = __z; return __r; } |
| 1143 | |
| 1144 | static simd_char4 SIMD_CFUNC vector4(char __x, char __y, char __z, char __w) { return ( simd_char4){__x, __y, __z, __w}; } |
| 1145 | static simd_uchar4 SIMD_CFUNC vector4(unsigned char __x, unsigned char __y, unsigned char __z, unsigned char __w) { return ( simd_uchar4){__x, __y, __z, __w}; } |
| 1146 | static simd_short4 SIMD_CFUNC vector4(short __x, short __y, short __z, short __w) { return ( simd_short4){__x, __y, __z, __w}; } |
| 1147 | static simd_ushort4 SIMD_CFUNC vector4(unsigned short __x, unsigned short __y, unsigned short __z, unsigned short __w) { return (simd_ushort4){__x, __y, __z, __w}; } |
| 1148 | static simd_half4 SIMD_CFUNC vector4(_Float16 __x, _Float16 __y, _Float16 __z, _Float16 __w) { return ( simd_half4){__x, __y, __z, __w}; } |
| 1149 | static simd_int4 SIMD_CFUNC vector4(int __x, int __y, int __z, int __w) { return ( simd_int4){__x, __y, __z, __w}; } |
| 1150 | static simd_uint4 SIMD_CFUNC vector4(unsigned int __x, unsigned int __y, unsigned int __z, unsigned int __w) { return ( simd_uint4){__x, __y, __z, __w}; } |
| 1151 | static simd_float4 SIMD_CFUNC vector4(float __x, float __y, float __z, float __w) { return ( simd_float4){__x, __y, __z, __w}; } |
| 1152 | static simd_long4 SIMD_CFUNC vector4(simd_long1 __x, simd_long1 __y, simd_long1 __z, simd_long1 __w) { return ( simd_long4){__x, __y, __z, __w}; } |
| 1153 | static simd_ulong4 SIMD_CFUNC vector4(simd_ulong1 __x, simd_ulong1 __y, simd_ulong1 __z, simd_ulong1 __w) { return ( simd_ulong4){__x, __y, __z, __w}; } |
| 1154 | static simd_double4 SIMD_CFUNC vector4(double __x, double __y, double __z, double __w) { return (simd_double4){__x, __y, __z, __w}; } |
| 1155 | |
| 1156 | static simd_char4 SIMD_CFUNC vector4(simd_char2 __xy, simd_char2 __zw) { simd_char4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } |
| 1157 | static simd_uchar4 SIMD_CFUNC vector4(simd_uchar2 __xy, simd_uchar2 __zw) { simd_uchar4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } |
| 1158 | static simd_short4 SIMD_CFUNC vector4(simd_short2 __xy, simd_short2 __zw) { simd_short4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } |
| 1159 | static simd_ushort4 SIMD_CFUNC vector4(simd_ushort2 __xy, simd_ushort2 __zw) { simd_ushort4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } |
| 1160 | static simd_half4 SIMD_CFUNC vector4(simd_half2 __xy, simd_half2 __zw) { simd_half4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } |
| 1161 | static simd_int4 SIMD_CFUNC vector4(simd_int2 __xy, simd_int2 __zw) { simd_int4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } |
| 1162 | static simd_uint4 SIMD_CFUNC vector4(simd_uint2 __xy, simd_uint2 __zw) { simd_uint4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } |
| 1163 | static simd_float4 SIMD_CFUNC vector4(simd_float2 __xy, simd_float2 __zw) { simd_float4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } |
| 1164 | static simd_long4 SIMD_CFUNC vector4(simd_long2 __xy, simd_long2 __zw) { simd_long4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } |
| 1165 | static simd_ulong4 SIMD_CFUNC vector4(simd_ulong2 __xy, simd_ulong2 __zw) { simd_ulong4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } |
| 1166 | static simd_double4 SIMD_CFUNC vector4(simd_double2 __xy, simd_double2 __zw) { simd_double4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } |
| 1167 | |
| 1168 | static simd_char4 SIMD_CFUNC vector4(simd_char3 __xyz, char __w) { simd_char4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } |
| 1169 | static simd_uchar4 SIMD_CFUNC vector4(simd_uchar3 __xyz, unsigned char __w) { simd_uchar4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } |
| 1170 | static simd_short4 SIMD_CFUNC vector4(simd_short3 __xyz, short __w) { simd_short4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } |
| 1171 | static simd_ushort4 SIMD_CFUNC vector4(simd_ushort3 __xyz, unsigned short __w) { simd_ushort4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } |
| 1172 | static simd_half4 SIMD_CFUNC vector4(simd_half3 __xyz, _Float16 __w) { simd_half4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } |
| 1173 | static simd_int4 SIMD_CFUNC vector4(simd_int3 __xyz, int __w) { simd_int4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } |
| 1174 | static simd_uint4 SIMD_CFUNC vector4(simd_uint3 __xyz, unsigned int __w) { simd_uint4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } |
| 1175 | static simd_float4 SIMD_CFUNC vector4(simd_float3 __xyz, float __w) { simd_float4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } |
| 1176 | static simd_long4 SIMD_CFUNC vector4(simd_long3 __xyz, simd_long1 __w) { simd_long4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } |
| 1177 | static simd_ulong4 SIMD_CFUNC vector4(simd_ulong3 __xyz, simd_ulong1 __w) { simd_ulong4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } |
| 1178 | static simd_double4 SIMD_CFUNC vector4(simd_double3 __xyz, double __w) { simd_double4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } |
| 1179 | |
| 1180 | static simd_char8 SIMD_CFUNC vector8(simd_char4 __lo, simd_char4 __hi) { simd_char8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } |
| 1181 | static simd_uchar8 SIMD_CFUNC vector8(simd_uchar4 __lo, simd_uchar4 __hi) { simd_uchar8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } |
| 1182 | static simd_short8 SIMD_CFUNC vector8(simd_short4 __lo, simd_short4 __hi) { simd_short8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } |
| 1183 | static simd_ushort8 SIMD_CFUNC vector8(simd_ushort4 __lo, simd_ushort4 __hi) { simd_ushort8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } |
| 1184 | static simd_half8 SIMD_CFUNC vector8(simd_half4 __lo, simd_half4 __hi) { simd_half8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } |
| 1185 | static simd_int8 SIMD_CFUNC vector8(simd_int4 __lo, simd_int4 __hi) { simd_int8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } |
| 1186 | static simd_uint8 SIMD_CFUNC vector8(simd_uint4 __lo, simd_uint4 __hi) { simd_uint8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } |
| 1187 | static simd_float8 SIMD_CFUNC vector8(simd_float4 __lo, simd_float4 __hi) { simd_float8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } |
| 1188 | static simd_long8 SIMD_CFUNC vector8(simd_long4 __lo, simd_long4 __hi) { simd_long8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } |
| 1189 | static simd_ulong8 SIMD_CFUNC vector8(simd_ulong4 __lo, simd_ulong4 __hi) { simd_ulong8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } |
| 1190 | static simd_double8 SIMD_CFUNC vector8(simd_double4 __lo, simd_double4 __hi) { simd_double8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } |
| 1191 | |
| 1192 | static simd_char16 SIMD_CFUNC vector16(simd_char8 __lo, simd_char8 __hi) { simd_char16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } |
| 1193 | static simd_uchar16 SIMD_CFUNC vector16(simd_uchar8 __lo, simd_uchar8 __hi) { simd_uchar16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } |
| 1194 | static simd_short16 SIMD_CFUNC vector16(simd_short8 __lo, simd_short8 __hi) { simd_short16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } |
| 1195 | static simd_ushort16 SIMD_CFUNC vector16(simd_ushort8 __lo, simd_ushort8 __hi) { simd_ushort16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } |
| 1196 | static simd_half16 SIMD_CFUNC vector16(simd_half8 __lo, simd_half8 __hi) { simd_half16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } |
| 1197 | static simd_int16 SIMD_CFUNC vector16(simd_int8 __lo, simd_int8 __hi) { simd_int16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } |
| 1198 | static simd_uint16 SIMD_CFUNC vector16(simd_uint8 __lo, simd_uint8 __hi) { simd_uint16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } |
| 1199 | static simd_float16 SIMD_CFUNC vector16(simd_float8 __lo, simd_float8 __hi) { simd_float16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } |
| 1200 | |
| 1201 | static simd_char32 SIMD_CFUNC vector32(simd_char16 __lo, simd_char16 __hi) { simd_char32 __r; __r.lo = __lo; __r.hi = __hi; return __r; } |
| 1202 | static simd_uchar32 SIMD_CFUNC vector32(simd_uchar16 __lo, simd_uchar16 __hi) { simd_uchar32 __r; __r.lo = __lo; __r.hi = __hi; return __r; } |
| 1203 | static simd_short32 SIMD_CFUNC vector32(simd_short16 __lo, simd_short16 __hi) { simd_short32 __r; __r.lo = __lo; __r.hi = __hi; return __r; } |
| 1204 | static simd_ushort32 SIMD_CFUNC vector32(simd_ushort16 __lo, simd_ushort16 __hi) { simd_ushort32 __r; __r.lo = __lo; __r.hi = __hi; return __r; } |
| 1205 | static simd_half32 SIMD_CFUNC vector32(simd_half16 __lo, simd_half16 __hi) { simd_half32 __r; __r.lo = __lo; __r.hi = __hi; return __r; } |
| 1206 | |
| 1207 | #pragma mark - Implementation |
| 1208 | |
| 1209 | static simd_char2 SIMD_CFUNC simd_char(simd_char2 __x) { return __x; } |
| 1210 | static simd_char3 SIMD_CFUNC simd_char(simd_char3 __x) { return __x; } |
| 1211 | static simd_char4 SIMD_CFUNC simd_char(simd_char4 __x) { return __x; } |
| 1212 | static simd_char8 SIMD_CFUNC simd_char(simd_char8 __x) { return __x; } |
| 1213 | static simd_char16 SIMD_CFUNC simd_char(simd_char16 __x) { return __x; } |
| 1214 | static simd_char32 SIMD_CFUNC simd_char(simd_char32 __x) { return __x; } |
| 1215 | static simd_char2 SIMD_CFUNC simd_char(simd_uchar2 __x) { return (simd_char2)__x; } |
| 1216 | static simd_char3 SIMD_CFUNC simd_char(simd_uchar3 __x) { return (simd_char3)__x; } |
| 1217 | static simd_char4 SIMD_CFUNC simd_char(simd_uchar4 __x) { return (simd_char4)__x; } |
| 1218 | static simd_char8 SIMD_CFUNC simd_char(simd_uchar8 __x) { return (simd_char8)__x; } |
| 1219 | static simd_char16 SIMD_CFUNC simd_char(simd_uchar16 __x) { return (simd_char16)__x; } |
| 1220 | static simd_char32 SIMD_CFUNC simd_char(simd_uchar32 __x) { return (simd_char32)__x; } |
| 1221 | static simd_char2 SIMD_CFUNC simd_char(simd_short2 __x) { return __builtin_convertvector(__x & 0xff, simd_char2); } |
| 1222 | static simd_char3 SIMD_CFUNC simd_char(simd_short3 __x) { return __builtin_convertvector(__x & 0xff, simd_char3); } |
| 1223 | static simd_char4 SIMD_CFUNC simd_char(simd_short4 __x) { return __builtin_convertvector(__x & 0xff, simd_char4); } |
| 1224 | static simd_char8 SIMD_CFUNC simd_char(simd_short8 __x) { return __builtin_convertvector(__x & 0xff, simd_char8); } |
| 1225 | static simd_char16 SIMD_CFUNC simd_char(simd_short16 __x) { return __builtin_convertvector(__x & 0xff, simd_char16); } |
| 1226 | static simd_char32 SIMD_CFUNC simd_char(simd_short32 __x) { return __builtin_convertvector(__x & 0xff, simd_char32); } |
| 1227 | static simd_char2 SIMD_CFUNC simd_char(simd_ushort2 __x) { return simd_char(simd_short(__x)); } |
| 1228 | static simd_char3 SIMD_CFUNC simd_char(simd_ushort3 __x) { return simd_char(simd_short(__x)); } |
| 1229 | static simd_char4 SIMD_CFUNC simd_char(simd_ushort4 __x) { return simd_char(simd_short(__x)); } |
| 1230 | static simd_char8 SIMD_CFUNC simd_char(simd_ushort8 __x) { return simd_char(simd_short(__x)); } |
| 1231 | static simd_char16 SIMD_CFUNC simd_char(simd_ushort16 __x) { return simd_char(simd_short(__x)); } |
| 1232 | static simd_char32 SIMD_CFUNC simd_char(simd_ushort32 __x) { return simd_char(simd_short(__x)); } |
| 1233 | static simd_char2 SIMD_CFUNC simd_char(simd_half2 __x) { return simd_char(simd_short(__x)); } |
| 1234 | static simd_char3 SIMD_CFUNC simd_char(simd_half3 __x) { return simd_char(simd_short(__x)); } |
| 1235 | static simd_char4 SIMD_CFUNC simd_char(simd_half4 __x) { return simd_char(simd_short(__x)); } |
| 1236 | static simd_char8 SIMD_CFUNC simd_char(simd_half8 __x) { return simd_char(simd_short(__x)); } |
| 1237 | static simd_char16 SIMD_CFUNC simd_char(simd_half16 __x) { return simd_char(simd_short(__x)); } |
| 1238 | static simd_char32 SIMD_CFUNC simd_char(simd_half32 __x) { return simd_char(simd_short(__x)); } |
| 1239 | static simd_char2 SIMD_CFUNC simd_char(simd_int2 __x) { return simd_char(simd_short(__x)); } |
| 1240 | static simd_char3 SIMD_CFUNC simd_char(simd_int3 __x) { return simd_char(simd_short(__x)); } |
| 1241 | static simd_char4 SIMD_CFUNC simd_char(simd_int4 __x) { return simd_char(simd_short(__x)); } |
| 1242 | static simd_char8 SIMD_CFUNC simd_char(simd_int8 __x) { return simd_char(simd_short(__x)); } |
| 1243 | static simd_char16 SIMD_CFUNC simd_char(simd_int16 __x) { return simd_char(simd_short(__x)); } |
| 1244 | static simd_char2 SIMD_CFUNC simd_char(simd_uint2 __x) { return simd_char(simd_short(__x)); } |
| 1245 | static simd_char3 SIMD_CFUNC simd_char(simd_uint3 __x) { return simd_char(simd_short(__x)); } |
| 1246 | static simd_char4 SIMD_CFUNC simd_char(simd_uint4 __x) { return simd_char(simd_short(__x)); } |
| 1247 | static simd_char8 SIMD_CFUNC simd_char(simd_uint8 __x) { return simd_char(simd_short(__x)); } |
| 1248 | static simd_char16 SIMD_CFUNC simd_char(simd_uint16 __x) { return simd_char(simd_short(__x)); } |
| 1249 | static simd_char2 SIMD_CFUNC simd_char(simd_float2 __x) { return simd_char(simd_short(__x)); } |
| 1250 | static simd_char3 SIMD_CFUNC simd_char(simd_float3 __x) { return simd_char(simd_short(__x)); } |
| 1251 | static simd_char4 SIMD_CFUNC simd_char(simd_float4 __x) { return simd_char(simd_short(__x)); } |
| 1252 | static simd_char8 SIMD_CFUNC simd_char(simd_float8 __x) { return simd_char(simd_short(__x)); } |
| 1253 | static simd_char16 SIMD_CFUNC simd_char(simd_float16 __x) { return simd_char(simd_short(__x)); } |
| 1254 | static simd_char2 SIMD_CFUNC simd_char(simd_long2 __x) { return simd_char(simd_short(__x)); } |
| 1255 | static simd_char3 SIMD_CFUNC simd_char(simd_long3 __x) { return simd_char(simd_short(__x)); } |
| 1256 | static simd_char4 SIMD_CFUNC simd_char(simd_long4 __x) { return simd_char(simd_short(__x)); } |
| 1257 | static simd_char8 SIMD_CFUNC simd_char(simd_long8 __x) { return simd_char(simd_short(__x)); } |
| 1258 | static simd_char2 SIMD_CFUNC simd_char(simd_ulong2 __x) { return simd_char(simd_short(__x)); } |
| 1259 | static simd_char3 SIMD_CFUNC simd_char(simd_ulong3 __x) { return simd_char(simd_short(__x)); } |
| 1260 | static simd_char4 SIMD_CFUNC simd_char(simd_ulong4 __x) { return simd_char(simd_short(__x)); } |
| 1261 | static simd_char8 SIMD_CFUNC simd_char(simd_ulong8 __x) { return simd_char(simd_short(__x)); } |
| 1262 | static simd_char2 SIMD_CFUNC simd_char(simd_double2 __x) { return simd_char(simd_short(__x)); } |
| 1263 | static simd_char3 SIMD_CFUNC simd_char(simd_double3 __x) { return simd_char(simd_short(__x)); } |
| 1264 | static simd_char4 SIMD_CFUNC simd_char(simd_double4 __x) { return simd_char(simd_short(__x)); } |
| 1265 | static simd_char8 SIMD_CFUNC simd_char(simd_double8 __x) { return simd_char(simd_short(__x)); } |
| 1266 | |
| 1267 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_char2 __x) { return __x; } |
| 1268 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_char3 __x) { return __x; } |
| 1269 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_char4 __x) { return __x; } |
| 1270 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_char8 __x) { return __x; } |
| 1271 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_char16 __x) { return __x; } |
| 1272 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_char32 __x) { return __x; } |
| 1273 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_short2 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1274 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_short3 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1275 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_short4 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1276 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_short8 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1277 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_short16 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1278 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_short32 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1279 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_half2 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1280 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_half3 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1281 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_half4 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1282 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_half8 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1283 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_half16 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1284 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_half32 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1285 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_int2 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1286 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_int3 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1287 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_int4 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1288 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_int8 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1289 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_int16 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1290 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_float2 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1291 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_float3 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1292 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_float4 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1293 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_float8 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1294 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_float16 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1295 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_long2 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1296 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_long3 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1297 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_long4 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1298 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_long8 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1299 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_double2 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1300 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_double3 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1301 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_double4 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1302 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_double8 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } |
| 1303 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_uchar2 __x) { return simd_char(simd_min(__x,0x7f)); } |
| 1304 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_uchar3 __x) { return simd_char(simd_min(__x,0x7f)); } |
| 1305 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_uchar4 __x) { return simd_char(simd_min(__x,0x7f)); } |
| 1306 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_uchar8 __x) { return simd_char(simd_min(__x,0x7f)); } |
| 1307 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_uchar16 __x) { return simd_char(simd_min(__x,0x7f)); } |
| 1308 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_uchar32 __x) { return simd_char(simd_min(__x,0x7f)); } |
| 1309 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_ushort2 __x) { return simd_char(simd_min(__x,0x7f)); } |
| 1310 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_ushort3 __x) { return simd_char(simd_min(__x,0x7f)); } |
| 1311 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_ushort4 __x) { return simd_char(simd_min(__x,0x7f)); } |
| 1312 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_ushort8 __x) { return simd_char(simd_min(__x,0x7f)); } |
| 1313 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_ushort16 __x) { return simd_char(simd_min(__x,0x7f)); } |
| 1314 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_ushort32 __x) { return simd_char(simd_min(__x,0x7f)); } |
| 1315 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_uint2 __x) { return simd_char(simd_min(__x,0x7f)); } |
| 1316 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_uint3 __x) { return simd_char(simd_min(__x,0x7f)); } |
| 1317 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_uint4 __x) { return simd_char(simd_min(__x,0x7f)); } |
| 1318 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_uint8 __x) { return simd_char(simd_min(__x,0x7f)); } |
| 1319 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_uint16 __x) { return simd_char(simd_min(__x,0x7f)); } |
| 1320 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_ulong2 __x) { return simd_char(simd_min(__x,0x7f)); } |
| 1321 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_ulong3 __x) { return simd_char(simd_min(__x,0x7f)); } |
| 1322 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_ulong4 __x) { return simd_char(simd_min(__x,0x7f)); } |
| 1323 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_ulong8 __x) { return simd_char(simd_min(__x,0x7f)); } |
| 1324 | |
| 1325 | |
| 1326 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_char2 __x) { return (simd_uchar2)__x; } |
| 1327 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_char3 __x) { return (simd_uchar3)__x; } |
| 1328 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_char4 __x) { return (simd_uchar4)__x; } |
| 1329 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_char8 __x) { return (simd_uchar8)__x; } |
| 1330 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_char16 __x) { return (simd_uchar16)__x; } |
| 1331 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_char32 __x) { return (simd_uchar32)__x; } |
| 1332 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_uchar2 __x) { return __x; } |
| 1333 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_uchar3 __x) { return __x; } |
| 1334 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_uchar4 __x) { return __x; } |
| 1335 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_uchar8 __x) { return __x; } |
| 1336 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_uchar16 __x) { return __x; } |
| 1337 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_uchar32 __x) { return __x; } |
| 1338 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_short2 __x) { return simd_uchar(simd_char(__x)); } |
| 1339 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_short3 __x) { return simd_uchar(simd_char(__x)); } |
| 1340 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_short4 __x) { return simd_uchar(simd_char(__x)); } |
| 1341 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_short8 __x) { return simd_uchar(simd_char(__x)); } |
| 1342 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_short16 __x) { return simd_uchar(simd_char(__x)); } |
| 1343 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_short32 __x) { return simd_uchar(simd_char(__x)); } |
| 1344 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_ushort2 __x) { return simd_uchar(simd_char(__x)); } |
| 1345 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_ushort3 __x) { return simd_uchar(simd_char(__x)); } |
| 1346 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_ushort4 __x) { return simd_uchar(simd_char(__x)); } |
| 1347 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_ushort8 __x) { return simd_uchar(simd_char(__x)); } |
| 1348 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_ushort16 __x) { return simd_uchar(simd_char(__x)); } |
| 1349 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_ushort32 __x) { return simd_uchar(simd_char(__x)); } |
| 1350 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_half2 __x) { return simd_uchar(simd_char(__x)); } |
| 1351 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_half3 __x) { return simd_uchar(simd_char(__x)); } |
| 1352 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_half4 __x) { return simd_uchar(simd_char(__x)); } |
| 1353 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_half8 __x) { return simd_uchar(simd_char(__x)); } |
| 1354 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_half16 __x) { return simd_uchar(simd_char(__x)); } |
| 1355 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_half32 __x) { return simd_uchar(simd_char(__x)); } |
| 1356 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_int2 __x) { return simd_uchar(simd_char(__x)); } |
| 1357 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_int3 __x) { return simd_uchar(simd_char(__x)); } |
| 1358 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_int4 __x) { return simd_uchar(simd_char(__x)); } |
| 1359 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_int8 __x) { return simd_uchar(simd_char(__x)); } |
| 1360 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_int16 __x) { return simd_uchar(simd_char(__x)); } |
| 1361 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_uint2 __x) { return simd_uchar(simd_char(__x)); } |
| 1362 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_uint3 __x) { return simd_uchar(simd_char(__x)); } |
| 1363 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_uint4 __x) { return simd_uchar(simd_char(__x)); } |
| 1364 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_uint8 __x) { return simd_uchar(simd_char(__x)); } |
| 1365 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_uint16 __x) { return simd_uchar(simd_char(__x)); } |
| 1366 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_float2 __x) { return simd_uchar(simd_char(__x)); } |
| 1367 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_float3 __x) { return simd_uchar(simd_char(__x)); } |
| 1368 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_float4 __x) { return simd_uchar(simd_char(__x)); } |
| 1369 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_float8 __x) { return simd_uchar(simd_char(__x)); } |
| 1370 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_float16 __x) { return simd_uchar(simd_char(__x)); } |
| 1371 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_long2 __x) { return simd_uchar(simd_char(__x)); } |
| 1372 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_long3 __x) { return simd_uchar(simd_char(__x)); } |
| 1373 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_long4 __x) { return simd_uchar(simd_char(__x)); } |
| 1374 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_long8 __x) { return simd_uchar(simd_char(__x)); } |
| 1375 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_ulong2 __x) { return simd_uchar(simd_char(__x)); } |
| 1376 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_ulong3 __x) { return simd_uchar(simd_char(__x)); } |
| 1377 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_ulong4 __x) { return simd_uchar(simd_char(__x)); } |
| 1378 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_ulong8 __x) { return simd_uchar(simd_char(__x)); } |
| 1379 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_double2 __x) { return simd_uchar(simd_char(__x)); } |
| 1380 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_double3 __x) { return simd_uchar(simd_char(__x)); } |
| 1381 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_double4 __x) { return simd_uchar(simd_char(__x)); } |
| 1382 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_double8 __x) { return simd_uchar(simd_char(__x)); } |
| 1383 | |
| 1384 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_char2 __x) { return simd_uchar(simd_max(0,__x)); } |
| 1385 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_char3 __x) { return simd_uchar(simd_max(0,__x)); } |
| 1386 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_char4 __x) { return simd_uchar(simd_max(0,__x)); } |
| 1387 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_char8 __x) { return simd_uchar(simd_max(0,__x)); } |
| 1388 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_char16 __x) { return simd_uchar(simd_max(0,__x)); } |
| 1389 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_char32 __x) { return simd_uchar(simd_max(0,__x)); } |
| 1390 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_short2 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1391 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_short3 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1392 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_short4 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1393 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_short8 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1394 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_short16 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1395 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_short32 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1396 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_half2 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1397 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_half3 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1398 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_half4 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1399 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_half8 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1400 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_half16 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1401 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_half32 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1402 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_int2 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1403 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_int3 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1404 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_int4 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1405 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_int8 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1406 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_int16 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1407 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_float2 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1408 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_float3 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1409 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_float4 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1410 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_float8 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1411 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_float16 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1412 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_long2 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1413 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_long3 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1414 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_long4 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1415 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_long8 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1416 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_double2 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1417 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_double3 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1418 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_double4 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1419 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_double8 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } |
| 1420 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_uchar2 __x) { return __x; } |
| 1421 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_uchar3 __x) { return __x; } |
| 1422 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_uchar4 __x) { return __x; } |
| 1423 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_uchar8 __x) { return __x; } |
| 1424 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_uchar16 __x) { return __x; } |
| 1425 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_uchar32 __x) { return __x; } |
| 1426 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_ushort2 __x) { return simd_uchar(simd_min(__x,0xff)); } |
| 1427 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_ushort3 __x) { return simd_uchar(simd_min(__x,0xff)); } |
| 1428 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_ushort4 __x) { return simd_uchar(simd_min(__x,0xff)); } |
| 1429 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_ushort8 __x) { return simd_uchar(simd_min(__x,0xff)); } |
| 1430 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_ushort16 __x) { return simd_uchar(simd_min(__x,0xff)); } |
| 1431 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_ushort32 __x) { return simd_uchar(simd_min(__x,0xff)); } |
| 1432 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_uint2 __x) { return simd_uchar(simd_min(__x,0xff)); } |
| 1433 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_uint3 __x) { return simd_uchar(simd_min(__x,0xff)); } |
| 1434 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_uint4 __x) { return simd_uchar(simd_min(__x,0xff)); } |
| 1435 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_uint8 __x) { return simd_uchar(simd_min(__x,0xff)); } |
| 1436 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_uint16 __x) { return simd_uchar(simd_min(__x,0xff)); } |
| 1437 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_ulong2 __x) { return simd_uchar(simd_min(__x,0xff)); } |
| 1438 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_ulong3 __x) { return simd_uchar(simd_min(__x,0xff)); } |
| 1439 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_ulong4 __x) { return simd_uchar(simd_min(__x,0xff)); } |
| 1440 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_ulong8 __x) { return simd_uchar(simd_min(__x,0xff)); } |
| 1441 | |
| 1442 | |
| 1443 | static simd_short2 SIMD_CFUNC simd_short(simd_char2 __x) { return __builtin_convertvector(__x, simd_short2); } |
| 1444 | static simd_short3 SIMD_CFUNC simd_short(simd_char3 __x) { return __builtin_convertvector(__x, simd_short3); } |
| 1445 | static simd_short4 SIMD_CFUNC simd_short(simd_char4 __x) { return __builtin_convertvector(__x, simd_short4); } |
| 1446 | static simd_short8 SIMD_CFUNC simd_short(simd_char8 __x) { return __builtin_convertvector(__x, simd_short8); } |
| 1447 | static simd_short16 SIMD_CFUNC simd_short(simd_char16 __x) { return __builtin_convertvector(__x, simd_short16); } |
| 1448 | static simd_short32 SIMD_CFUNC simd_short(simd_char32 __x) { return __builtin_convertvector(__x, simd_short32); } |
| 1449 | static simd_short2 SIMD_CFUNC simd_short(simd_uchar2 __x) { return __builtin_convertvector(__x, simd_short2); } |
| 1450 | static simd_short3 SIMD_CFUNC simd_short(simd_uchar3 __x) { return __builtin_convertvector(__x, simd_short3); } |
| 1451 | static simd_short4 SIMD_CFUNC simd_short(simd_uchar4 __x) { return __builtin_convertvector(__x, simd_short4); } |
| 1452 | static simd_short8 SIMD_CFUNC simd_short(simd_uchar8 __x) { return __builtin_convertvector(__x, simd_short8); } |
| 1453 | static simd_short16 SIMD_CFUNC simd_short(simd_uchar16 __x) { return __builtin_convertvector(__x, simd_short16); } |
| 1454 | static simd_short32 SIMD_CFUNC simd_short(simd_uchar32 __x) { return __builtin_convertvector(__x, simd_short32); } |
| 1455 | static simd_short2 SIMD_CFUNC simd_short(simd_short2 __x) { return __x; } |
| 1456 | static simd_short3 SIMD_CFUNC simd_short(simd_short3 __x) { return __x; } |
| 1457 | static simd_short4 SIMD_CFUNC simd_short(simd_short4 __x) { return __x; } |
| 1458 | static simd_short8 SIMD_CFUNC simd_short(simd_short8 __x) { return __x; } |
| 1459 | static simd_short16 SIMD_CFUNC simd_short(simd_short16 __x) { return __x; } |
| 1460 | static simd_short32 SIMD_CFUNC simd_short(simd_short32 __x) { return __x; } |
| 1461 | static simd_short2 SIMD_CFUNC simd_short(simd_ushort2 __x) { return (simd_short2)__x; } |
| 1462 | static simd_short3 SIMD_CFUNC simd_short(simd_ushort3 __x) { return (simd_short3)__x; } |
| 1463 | static simd_short4 SIMD_CFUNC simd_short(simd_ushort4 __x) { return (simd_short4)__x; } |
| 1464 | static simd_short8 SIMD_CFUNC simd_short(simd_ushort8 __x) { return (simd_short8)__x; } |
| 1465 | static simd_short16 SIMD_CFUNC simd_short(simd_ushort16 __x) { return (simd_short16)__x; } |
| 1466 | static simd_short32 SIMD_CFUNC simd_short(simd_ushort32 __x) { return (simd_short32)__x; } |
| 1467 | static simd_short2 SIMD_CFUNC simd_short(simd_half2 __x) { return __builtin_convertvector(__x, simd_short2); } |
| 1468 | static simd_short3 SIMD_CFUNC simd_short(simd_half3 __x) { return __builtin_convertvector(__x, simd_short3); } |
| 1469 | static simd_short4 SIMD_CFUNC simd_short(simd_half4 __x) { return __builtin_convertvector(__x, simd_short4); } |
| 1470 | static simd_short8 SIMD_CFUNC simd_short(simd_half8 __x) { return __builtin_convertvector(__x, simd_short8); } |
| 1471 | static simd_short16 SIMD_CFUNC simd_short(simd_half16 __x) { return __builtin_convertvector(__x, simd_short16); } |
| 1472 | static simd_short32 SIMD_CFUNC simd_short(simd_half32 __x) { return __builtin_convertvector(__x, simd_short32); } |
| 1473 | static simd_short2 SIMD_CFUNC simd_short(simd_int2 __x) { return __builtin_convertvector(__x & 0xffff, simd_short2); } |
| 1474 | static simd_short3 SIMD_CFUNC simd_short(simd_int3 __x) { return __builtin_convertvector(__x & 0xffff, simd_short3); } |
| 1475 | static simd_short4 SIMD_CFUNC simd_short(simd_int4 __x) { return __builtin_convertvector(__x & 0xffff, simd_short4); } |
| 1476 | static simd_short8 SIMD_CFUNC simd_short(simd_int8 __x) { return __builtin_convertvector(__x & 0xffff, simd_short8); } |
| 1477 | static simd_short16 SIMD_CFUNC simd_short(simd_int16 __x) { return __builtin_convertvector(__x & 0xffff, simd_short16); } |
| 1478 | static simd_short2 SIMD_CFUNC simd_short(simd_uint2 __x) { return simd_short(simd_int(__x)); } |
| 1479 | static simd_short3 SIMD_CFUNC simd_short(simd_uint3 __x) { return simd_short(simd_int(__x)); } |
| 1480 | static simd_short4 SIMD_CFUNC simd_short(simd_uint4 __x) { return simd_short(simd_int(__x)); } |
| 1481 | static simd_short8 SIMD_CFUNC simd_short(simd_uint8 __x) { return simd_short(simd_int(__x)); } |
| 1482 | static simd_short16 SIMD_CFUNC simd_short(simd_uint16 __x) { return simd_short(simd_int(__x)); } |
| 1483 | static simd_short2 SIMD_CFUNC simd_short(simd_float2 __x) { return simd_short(simd_int(__x)); } |
| 1484 | static simd_short3 SIMD_CFUNC simd_short(simd_float3 __x) { return simd_short(simd_int(__x)); } |
| 1485 | static simd_short4 SIMD_CFUNC simd_short(simd_float4 __x) { return simd_short(simd_int(__x)); } |
| 1486 | static simd_short8 SIMD_CFUNC simd_short(simd_float8 __x) { return simd_short(simd_int(__x)); } |
| 1487 | static simd_short16 SIMD_CFUNC simd_short(simd_float16 __x) { return simd_short(simd_int(__x)); } |
| 1488 | static simd_short2 SIMD_CFUNC simd_short(simd_long2 __x) { return simd_short(simd_int(__x)); } |
| 1489 | static simd_short3 SIMD_CFUNC simd_short(simd_long3 __x) { return simd_short(simd_int(__x)); } |
| 1490 | static simd_short4 SIMD_CFUNC simd_short(simd_long4 __x) { return simd_short(simd_int(__x)); } |
| 1491 | static simd_short8 SIMD_CFUNC simd_short(simd_long8 __x) { return simd_short(simd_int(__x)); } |
| 1492 | static simd_short2 SIMD_CFUNC simd_short(simd_ulong2 __x) { return simd_short(simd_int(__x)); } |
| 1493 | static simd_short3 SIMD_CFUNC simd_short(simd_ulong3 __x) { return simd_short(simd_int(__x)); } |
| 1494 | static simd_short4 SIMD_CFUNC simd_short(simd_ulong4 __x) { return simd_short(simd_int(__x)); } |
| 1495 | static simd_short8 SIMD_CFUNC simd_short(simd_ulong8 __x) { return simd_short(simd_int(__x)); } |
| 1496 | static simd_short2 SIMD_CFUNC simd_short(simd_double2 __x) { return simd_short(simd_int(__x)); } |
| 1497 | static simd_short3 SIMD_CFUNC simd_short(simd_double3 __x) { return simd_short(simd_int(__x)); } |
| 1498 | static simd_short4 SIMD_CFUNC simd_short(simd_double4 __x) { return simd_short(simd_int(__x)); } |
| 1499 | static simd_short8 SIMD_CFUNC simd_short(simd_double8 __x) { return simd_short(simd_int(__x)); } |
| 1500 | |
| 1501 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_char2 __x) { return simd_short(__x); } |
| 1502 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_char3 __x) { return simd_short(__x); } |
| 1503 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_char4 __x) { return simd_short(__x); } |
| 1504 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_char8 __x) { return simd_short(__x); } |
| 1505 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_char16 __x) { return simd_short(__x); } |
| 1506 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_char32 __x) { return simd_short(__x); } |
| 1507 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_short2 __x) { return __x; } |
| 1508 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_short3 __x) { return __x; } |
| 1509 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_short4 __x) { return __x; } |
| 1510 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_short8 __x) { return __x; } |
| 1511 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_short16 __x) { return __x; } |
| 1512 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_short32 __x) { return __x; } |
| 1513 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_half2 __x) { return simd_bitselect(simd_short(simd_max(__x,-0x1.0p15f16)), 0x7fff, __x >= 0x1.0p15f16); } |
| 1514 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_half3 __x) { return simd_bitselect(simd_short(simd_max(__x,-0x1.0p15f16)), 0x7fff, __x >= 0x1.0p15f16); } |
| 1515 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_half4 __x) { return simd_bitselect(simd_short(simd_max(__x,-0x1.0p15f16)), 0x7fff, __x >= 0x1.0p15f16); } |
| 1516 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_half8 __x) { return simd_bitselect(simd_short(simd_max(__x,-0x1.0p15f16)), 0x7fff, __x >= 0x1.0p15f16); } |
| 1517 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_half16 __x) { return simd_bitselect(simd_short(simd_max(__x,-0x1.0p15f16)), 0x7fff, __x >= 0x1.0p15f16); } |
| 1518 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_half32 __x) { return simd_bitselect(simd_short(simd_max(__x,-0x1.0p15f16)), 0x7fff, __x >= 0x1.0p15f16); } |
| 1519 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_int2 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } |
| 1520 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_int3 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } |
| 1521 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_int4 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } |
| 1522 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_int8 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } |
| 1523 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_int16 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } |
| 1524 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_float2 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } |
| 1525 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_float3 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } |
| 1526 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_float4 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } |
| 1527 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_float8 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } |
| 1528 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_float16 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } |
| 1529 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_long2 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } |
| 1530 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_long3 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } |
| 1531 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_long4 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } |
| 1532 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_long8 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } |
| 1533 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_double2 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } |
| 1534 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_double3 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } |
| 1535 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_double4 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } |
| 1536 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_double8 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } |
| 1537 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_uchar2 __x) { return simd_short(__x); } |
| 1538 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_uchar3 __x) { return simd_short(__x); } |
| 1539 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_uchar4 __x) { return simd_short(__x); } |
| 1540 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_uchar8 __x) { return simd_short(__x); } |
| 1541 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_uchar16 __x) { return simd_short(__x); } |
| 1542 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_uchar32 __x) { return simd_short(__x); } |
| 1543 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_ushort2 __x) { return simd_short(simd_min(__x,0x7fff)); } |
| 1544 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_ushort3 __x) { return simd_short(simd_min(__x,0x7fff)); } |
| 1545 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_ushort4 __x) { return simd_short(simd_min(__x,0x7fff)); } |
| 1546 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_ushort8 __x) { return simd_short(simd_min(__x,0x7fff)); } |
| 1547 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_ushort16 __x) { return simd_short(simd_min(__x,0x7fff)); } |
| 1548 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_ushort32 __x) { return simd_short(simd_min(__x,0x7fff)); } |
| 1549 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_uint2 __x) { return simd_short(simd_min(__x,0x7fff)); } |
| 1550 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_uint3 __x) { return simd_short(simd_min(__x,0x7fff)); } |
| 1551 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_uint4 __x) { return simd_short(simd_min(__x,0x7fff)); } |
| 1552 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_uint8 __x) { return simd_short(simd_min(__x,0x7fff)); } |
| 1553 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_uint16 __x) { return simd_short(simd_min(__x,0x7fff)); } |
| 1554 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_ulong2 __x) { return simd_short(simd_min(__x,0x7fff)); } |
| 1555 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_ulong3 __x) { return simd_short(simd_min(__x,0x7fff)); } |
| 1556 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_ulong4 __x) { return simd_short(simd_min(__x,0x7fff)); } |
| 1557 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_ulong8 __x) { return simd_short(simd_min(__x,0x7fff)); } |
| 1558 | static simd_short2 SIMD_CFUNC simd_short_rte(simd_half2 __x) { return simd_make_short2(simd_short_rte(simd_make_half4_undef(__x))); } |
| 1559 | static simd_short3 SIMD_CFUNC simd_short_rte(simd_half3 __x) { return simd_make_short3(simd_short_rte(simd_make_half4_undef(__x))); } |
| 1560 | static simd_short4 SIMD_CFUNC simd_short_rte(simd_half4 __x) { |
| 1561 | #if defined __ARM_FEATURE_FP16_VECTOR_ARITHMETIC |
| 1562 | return vcvtn_s16_f16(__x); |
| 1563 | #else |
| 1564 | return simd_make_short4(simd_short_rte(simd_make_half8_undef(__x))); |
| 1565 | #endif |
| 1566 | } |
| 1567 | static simd_short8 SIMD_CFUNC simd_short_rte(simd_half8 __x) { |
| 1568 | #if defined __ARM_FEATURE_FP16_VECTOR_ARITHMETIC |
| 1569 | return vcvtnq_s16_f16(__x); |
| 1570 | #else |
| 1571 | simd_half8 magic = __tg_copysign(0x1.0p10f16, __x); |
| 1572 | simd_short8 x_is_small = __tg_fabs(__x) < 0x1.0p10f16; |
| 1573 | return __builtin_convertvector(simd_bitselect(__x, (__x + magic) - magic, x_is_small & 0x7fff), simd_short8); |
| 1574 | #endif |
| 1575 | } |
| 1576 | static simd_short16 SIMD_CFUNC simd_short_rte(simd_half16 __x) { return simd_make_short16(simd_short_rte(__x.lo), simd_short_rte(__x.hi)); } |
| 1577 | static simd_short32 SIMD_CFUNC simd_short_rte(simd_half32 __x) { return simd_make_short32(simd_short_rte(__x.lo), simd_short_rte(__x.hi)); } |
| 1578 | |
| 1579 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_char2 __x) { return simd_ushort(simd_short(__x)); } |
| 1580 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_char3 __x) { return simd_ushort(simd_short(__x)); } |
| 1581 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_char4 __x) { return simd_ushort(simd_short(__x)); } |
| 1582 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_char8 __x) { return simd_ushort(simd_short(__x)); } |
| 1583 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_char16 __x) { return simd_ushort(simd_short(__x)); } |
| 1584 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_char32 __x) { return simd_ushort(simd_short(__x)); } |
| 1585 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_uchar2 __x) { return simd_ushort(simd_short(__x)); } |
| 1586 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_uchar3 __x) { return simd_ushort(simd_short(__x)); } |
| 1587 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_uchar4 __x) { return simd_ushort(simd_short(__x)); } |
| 1588 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_uchar8 __x) { return simd_ushort(simd_short(__x)); } |
| 1589 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_uchar16 __x) { return simd_ushort(simd_short(__x)); } |
| 1590 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_uchar32 __x) { return simd_ushort(simd_short(__x)); } |
| 1591 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_short2 __x) { return (simd_ushort2)__x; } |
| 1592 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_short3 __x) { return (simd_ushort3)__x; } |
| 1593 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_short4 __x) { return (simd_ushort4)__x; } |
| 1594 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_short8 __x) { return (simd_ushort8)__x; } |
| 1595 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_short16 __x) { return (simd_ushort16)__x; } |
| 1596 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_short32 __x) { return (simd_ushort32)__x; } |
| 1597 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_ushort2 __x) { return __x; } |
| 1598 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_ushort3 __x) { return __x; } |
| 1599 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_ushort4 __x) { return __x; } |
| 1600 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_ushort8 __x) { return __x; } |
| 1601 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_ushort16 __x) { return __x; } |
| 1602 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_ushort32 __x) { return __x; } |
| 1603 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_half2 __x) { return __builtin_convertvector(__x, simd_ushort2); } |
| 1604 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_half3 __x) { return __builtin_convertvector(__x, simd_ushort3); } |
| 1605 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_half4 __x) { return __builtin_convertvector(__x, simd_ushort4); } |
| 1606 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_half8 __x) { return __builtin_convertvector(__x, simd_ushort8); } |
| 1607 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_half16 __x) { return __builtin_convertvector(__x, simd_ushort16); } |
| 1608 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_half32 __x) { return __builtin_convertvector(__x, simd_ushort32); } |
| 1609 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_int2 __x) { return simd_ushort(simd_short(__x)); } |
| 1610 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_int3 __x) { return simd_ushort(simd_short(__x)); } |
| 1611 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_int4 __x) { return simd_ushort(simd_short(__x)); } |
| 1612 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_int8 __x) { return simd_ushort(simd_short(__x)); } |
| 1613 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_int16 __x) { return simd_ushort(simd_short(__x)); } |
| 1614 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_uint2 __x) { return simd_ushort(simd_short(__x)); } |
| 1615 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_uint3 __x) { return simd_ushort(simd_short(__x)); } |
| 1616 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_uint4 __x) { return simd_ushort(simd_short(__x)); } |
| 1617 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_uint8 __x) { return simd_ushort(simd_short(__x)); } |
| 1618 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_uint16 __x) { return simd_ushort(simd_short(__x)); } |
| 1619 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_float2 __x) { return simd_ushort(simd_short(__x)); } |
| 1620 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_float3 __x) { return simd_ushort(simd_short(__x)); } |
| 1621 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_float4 __x) { return simd_ushort(simd_short(__x)); } |
| 1622 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_float8 __x) { return simd_ushort(simd_short(__x)); } |
| 1623 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_float16 __x) { return simd_ushort(simd_short(__x)); } |
| 1624 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_long2 __x) { return simd_ushort(simd_short(__x)); } |
| 1625 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_long3 __x) { return simd_ushort(simd_short(__x)); } |
| 1626 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_long4 __x) { return simd_ushort(simd_short(__x)); } |
| 1627 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_long8 __x) { return simd_ushort(simd_short(__x)); } |
| 1628 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_ulong2 __x) { return simd_ushort(simd_short(__x)); } |
| 1629 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_ulong3 __x) { return simd_ushort(simd_short(__x)); } |
| 1630 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_ulong4 __x) { return simd_ushort(simd_short(__x)); } |
| 1631 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_ulong8 __x) { return simd_ushort(simd_short(__x)); } |
| 1632 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_double2 __x) { return simd_ushort(simd_short(__x)); } |
| 1633 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_double3 __x) { return simd_ushort(simd_short(__x)); } |
| 1634 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_double4 __x) { return simd_ushort(simd_short(__x)); } |
| 1635 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_double8 __x) { return simd_ushort(simd_short(__x)); } |
| 1636 | |
| 1637 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_char2 __x) { return simd_ushort(simd_max(__x, 0)); } |
| 1638 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_char3 __x) { return simd_ushort(simd_max(__x, 0)); } |
| 1639 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_char4 __x) { return simd_ushort(simd_max(__x, 0)); } |
| 1640 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_char8 __x) { return simd_ushort(simd_max(__x, 0)); } |
| 1641 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_char16 __x) { return simd_ushort(simd_max(__x, 0)); } |
| 1642 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_char32 __x) { return simd_ushort(simd_max(__x, 0)); } |
| 1643 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_short2 __x) { return simd_ushort(simd_max(__x, 0)); } |
| 1644 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_short3 __x) { return simd_ushort(simd_max(__x, 0)); } |
| 1645 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_short4 __x) { return simd_ushort(simd_max(__x, 0)); } |
| 1646 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_short8 __x) { return simd_ushort(simd_max(__x, 0)); } |
| 1647 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_short16 __x) { return simd_ushort(simd_max(__x, 0)); } |
| 1648 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_short32 __x) { return simd_ushort(simd_max(__x, 0)); } |
| 1649 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_half2 __x) { return simd_bitselect(simd_ushort(simd_max(__x,0)), 0xffff, __x > 0x1.ffcp15f16); } |
| 1650 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_half3 __x) { return simd_bitselect(simd_ushort(simd_max(__x,0)), 0xffff, __x > 0x1.ffcp15f16); } |
| 1651 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_half4 __x) { return simd_bitselect(simd_ushort(simd_max(__x,0)), 0xffff, __x > 0x1.ffcp15f16); } |
| 1652 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_half8 __x) { return simd_bitselect(simd_ushort(simd_max(__x,0)), 0xffff, __x > 0x1.ffcp15f16); } |
| 1653 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_half16 __x) { return simd_bitselect(simd_ushort(simd_max(__x,0)), 0xffff, __x > 0x1.ffcp15f16); } |
| 1654 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_half32 __x) { return simd_bitselect(simd_ushort(simd_max(__x,0)), 0xffff, __x > 0x1.ffcp15f16); } |
| 1655 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_int2 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } |
| 1656 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_int3 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } |
| 1657 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_int4 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } |
| 1658 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_int8 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } |
| 1659 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_int16 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } |
| 1660 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_float2 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } |
| 1661 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_float3 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } |
| 1662 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_float4 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } |
| 1663 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_float8 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } |
| 1664 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_float16 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } |
| 1665 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_long2 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } |
| 1666 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_long3 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } |
| 1667 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_long4 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } |
| 1668 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_long8 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } |
| 1669 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_double2 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } |
| 1670 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_double3 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } |
| 1671 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_double4 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } |
| 1672 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_double8 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } |
| 1673 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_uchar2 __x) { return simd_ushort(__x); } |
| 1674 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_uchar3 __x) { return simd_ushort(__x); } |
| 1675 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_uchar4 __x) { return simd_ushort(__x); } |
| 1676 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_uchar8 __x) { return simd_ushort(__x); } |
| 1677 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_uchar16 __x) { return simd_ushort(__x); } |
| 1678 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_uchar32 __x) { return simd_ushort(__x); } |
| 1679 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_ushort2 __x) { return __x; } |
| 1680 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_ushort3 __x) { return __x; } |
| 1681 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_ushort4 __x) { return __x; } |
| 1682 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_ushort8 __x) { return __x; } |
| 1683 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_ushort16 __x) { return __x; } |
| 1684 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_ushort32 __x) { return __x; } |
| 1685 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_uint2 __x) { return simd_ushort(simd_min(__x, 0xffff)); } |
| 1686 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_uint3 __x) { return simd_ushort(simd_min(__x, 0xffff)); } |
| 1687 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_uint4 __x) { return simd_ushort(simd_min(__x, 0xffff)); } |
| 1688 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_uint8 __x) { return simd_ushort(simd_min(__x, 0xffff)); } |
| 1689 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_uint16 __x) { return simd_ushort(simd_min(__x, 0xffff)); } |
| 1690 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_ulong2 __x) { return simd_ushort(simd_min(__x, 0xffff)); } |
| 1691 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_ulong3 __x) { return simd_ushort(simd_min(__x, 0xffff)); } |
| 1692 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_ulong4 __x) { return simd_ushort(simd_min(__x, 0xffff)); } |
| 1693 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_ulong8 __x) { return simd_ushort(simd_min(__x, 0xffff)); } |
| 1694 | static simd_ushort2 SIMD_CFUNC simd_ushort_rte(simd_half2 __x) { return simd_make_ushort2(simd_ushort_rte(simd_make_half4_undef(__x))); } |
| 1695 | static simd_ushort3 SIMD_CFUNC simd_ushort_rte(simd_half3 __x) { return simd_make_ushort3(simd_ushort_rte(simd_make_half4_undef(__x))); } |
| 1696 | static simd_ushort4 SIMD_CFUNC simd_ushort_rte(simd_half4 __x) { |
| 1697 | #if defined __ARM_FEATURE_FP16_VECTOR_ARITHMETIC |
| 1698 | return vcvtn_u16_f16(__x); |
| 1699 | #else |
| 1700 | return simd_make_ushort4(simd_ushort_rte(simd_make_half8_undef(__x))); |
| 1701 | #endif |
| 1702 | } |
| 1703 | static simd_ushort8 SIMD_CFUNC simd_ushort_rte(simd_half8 __x) { |
| 1704 | #if defined __ARM_FEATURE_FP16_VECTOR_ARITHMETIC |
| 1705 | return vcvtnq_u16_f16(__x); |
| 1706 | #else |
| 1707 | simd_short8 __big = __x >= 0x1.0p15f16; |
| 1708 | return simd_ushort(simd_short(__x - simd_bitselect((simd_half8) 0,0x1.0p15f16,__big))) + simd_bitselect((simd_ushort8) 0,0x8000,__big); |
| 1709 | #endif |
| 1710 | } |
| 1711 | static simd_ushort16 SIMD_CFUNC simd_ushort_rte(simd_half16 __x) { return simd_make_ushort16(simd_ushort_rte(__x.lo), simd_ushort_rte(__x.hi)); } |
| 1712 | static simd_ushort32 SIMD_CFUNC simd_ushort_rte(simd_half32 __x) { return simd_make_ushort32(simd_ushort_rte(__x.lo), simd_ushort_rte(__x.hi)); } |
| 1713 | |
| 1714 | static simd_half2 SIMD_CFUNC simd_half(simd_char2 __x) { return (simd_half2)(simd_short(__x) + 0x6600) - 0x1.8p10f16; } |
| 1715 | static simd_half3 SIMD_CFUNC simd_half(simd_char3 __x) { return (simd_half3)(simd_short(__x) + 0x6600) - 0x1.8p10f16; } |
| 1716 | static simd_half4 SIMD_CFUNC simd_half(simd_char4 __x) { return (simd_half4)(simd_short(__x) + 0x6600) - 0x1.8p10f16; } |
| 1717 | static simd_half8 SIMD_CFUNC simd_half(simd_char8 __x) { return (simd_half8)(simd_short(__x) + 0x6600) - 0x1.8p10f16; } |
| 1718 | static simd_half16 SIMD_CFUNC simd_half(simd_char16 __x) { return (simd_half16)(simd_short(__x) + 0x6600) - 0x1.8p10f16; } |
| 1719 | static simd_half2 SIMD_CFUNC simd_half(simd_uchar2 __x) { return (simd_half2)(simd_short(__x) + 0x6600) - 0x1.8p10f16; } |
| 1720 | static simd_half3 SIMD_CFUNC simd_half(simd_uchar3 __x) { return (simd_half3)(simd_short(__x) + 0x6600) - 0x1.8p10f16; } |
| 1721 | static simd_half4 SIMD_CFUNC simd_half(simd_uchar4 __x) { return (simd_half4)(simd_short(__x) + 0x6600) - 0x1.8p10f16; } |
| 1722 | static simd_half8 SIMD_CFUNC simd_half(simd_uchar8 __x) { return (simd_half8)(simd_short(__x) + 0x6600) - 0x1.8p10f16; } |
| 1723 | static simd_half16 SIMD_CFUNC simd_half(simd_uchar16 __x) { return (simd_half16)(simd_short(__x) + 0x6600) - 0x1.8p10f16; } |
| 1724 | static simd_half2 SIMD_CFUNC simd_half(simd_short2 __x) { return __builtin_convertvector(__x,simd_half2); } |
| 1725 | static simd_half3 SIMD_CFUNC simd_half(simd_short3 __x) { return __builtin_convertvector(__x,simd_half3); } |
| 1726 | static simd_half4 SIMD_CFUNC simd_half(simd_short4 __x) { return __builtin_convertvector(__x,simd_half4); } |
| 1727 | static simd_half8 SIMD_CFUNC simd_half(simd_short8 __x) { return __builtin_convertvector(__x,simd_half8); } |
| 1728 | static simd_half16 SIMD_CFUNC simd_half(simd_short16 __x) { return __builtin_convertvector(__x,simd_half16); } |
| 1729 | static simd_half2 SIMD_CFUNC simd_half(simd_ushort2 __x) { return __builtin_convertvector(__x,simd_half2); } |
| 1730 | static simd_half3 SIMD_CFUNC simd_half(simd_ushort3 __x) { return __builtin_convertvector(__x,simd_half3); } |
| 1731 | static simd_half4 SIMD_CFUNC simd_half(simd_ushort4 __x) { return __builtin_convertvector(__x,simd_half4); } |
| 1732 | static simd_half8 SIMD_CFUNC simd_half(simd_ushort8 __x) { return __builtin_convertvector(__x,simd_half8); } |
| 1733 | static simd_half16 SIMD_CFUNC simd_half(simd_ushort16 __x) { return __builtin_convertvector(__x,simd_half16); } |
| 1734 | static simd_half2 SIMD_CFUNC simd_half(simd_half2 __x) { return __x; } |
| 1735 | static simd_half3 SIMD_CFUNC simd_half(simd_half3 __x) { return __x; } |
| 1736 | static simd_half4 SIMD_CFUNC simd_half(simd_half4 __x) { return __x; } |
| 1737 | static simd_half8 SIMD_CFUNC simd_half(simd_half8 __x) { return __x; } |
| 1738 | static simd_half16 SIMD_CFUNC simd_half(simd_half16 __x) { return __x; } |
| 1739 | static simd_half2 SIMD_CFUNC simd_half(simd_int2 __x) { return __builtin_convertvector(__x,simd_half2); } |
| 1740 | static simd_half3 SIMD_CFUNC simd_half(simd_int3 __x) { return __builtin_convertvector(__x,simd_half3); } |
| 1741 | static simd_half4 SIMD_CFUNC simd_half(simd_int4 __x) { return __builtin_convertvector(__x,simd_half4); } |
| 1742 | static simd_half8 SIMD_CFUNC simd_half(simd_int8 __x) { return __builtin_convertvector(__x,simd_half8); } |
| 1743 | static simd_half16 SIMD_CFUNC simd_half(simd_int16 __x) { return __builtin_convertvector(__x,simd_half16); } |
| 1744 | static simd_half2 SIMD_CFUNC simd_half(simd_uint2 __x) { return __builtin_convertvector(__x,simd_half2); } |
| 1745 | static simd_half3 SIMD_CFUNC simd_half(simd_uint3 __x) { return __builtin_convertvector(__x,simd_half3); } |
| 1746 | static simd_half4 SIMD_CFUNC simd_half(simd_uint4 __x) { return __builtin_convertvector(__x,simd_half4); } |
| 1747 | static simd_half8 SIMD_CFUNC simd_half(simd_uint8 __x) { return __builtin_convertvector(__x,simd_half8); } |
| 1748 | static simd_half16 SIMD_CFUNC simd_half(simd_uint16 __x) { return __builtin_convertvector(__x,simd_half16); } |
| 1749 | static simd_half2 SIMD_CFUNC simd_half(simd_float2 __x) { return __builtin_convertvector(__x,simd_half2); } |
| 1750 | static simd_half3 SIMD_CFUNC simd_half(simd_float3 __x) { return __builtin_convertvector(__x,simd_half3); } |
| 1751 | static simd_half4 SIMD_CFUNC simd_half(simd_float4 __x) { return __builtin_convertvector(__x,simd_half4); } |
| 1752 | static simd_half8 SIMD_CFUNC simd_half(simd_float8 __x) { return __builtin_convertvector(__x,simd_half8); } |
| 1753 | static simd_half16 SIMD_CFUNC simd_half(simd_float16 __x) { return __builtin_convertvector(__x,simd_half16); } |
| 1754 | static simd_half2 SIMD_CFUNC simd_half(simd_long2 __x) { return __builtin_convertvector(__x,simd_half2); } |
| 1755 | static simd_half3 SIMD_CFUNC simd_half(simd_long3 __x) { return __builtin_convertvector(__x,simd_half3); } |
| 1756 | static simd_half4 SIMD_CFUNC simd_half(simd_long4 __x) { return __builtin_convertvector(__x,simd_half4); } |
| 1757 | static simd_half8 SIMD_CFUNC simd_half(simd_long8 __x) { return __builtin_convertvector(__x,simd_half8); } |
| 1758 | static simd_half2 SIMD_CFUNC simd_half(simd_ulong2 __x) { return __builtin_convertvector(__x,simd_half2); } |
| 1759 | static simd_half3 SIMD_CFUNC simd_half(simd_ulong3 __x) { return __builtin_convertvector(__x,simd_half3); } |
| 1760 | static simd_half4 SIMD_CFUNC simd_half(simd_ulong4 __x) { return __builtin_convertvector(__x,simd_half4); } |
| 1761 | static simd_half8 SIMD_CFUNC simd_half(simd_ulong8 __x) { return __builtin_convertvector(__x,simd_half8); } |
| 1762 | static simd_half2 SIMD_CFUNC simd_half(simd_double2 __x) { return __builtin_convertvector(__x,simd_half2); } |
| 1763 | static simd_half3 SIMD_CFUNC simd_half(simd_double3 __x) { return __builtin_convertvector(__x,simd_half3); } |
| 1764 | static simd_half4 SIMD_CFUNC simd_half(simd_double4 __x) { return __builtin_convertvector(__x,simd_half4); } |
| 1765 | static simd_half8 SIMD_CFUNC simd_half(simd_double8 __x) { return __builtin_convertvector(__x,simd_half8); } |
| 1766 | |
| 1767 | static simd_int2 SIMD_CFUNC simd_int(simd_char2 __x) { return __builtin_convertvector(__x, simd_int2); } |
| 1768 | static simd_int3 SIMD_CFUNC simd_int(simd_char3 __x) { return __builtin_convertvector(__x, simd_int3); } |
| 1769 | static simd_int4 SIMD_CFUNC simd_int(simd_char4 __x) { return __builtin_convertvector(__x, simd_int4); } |
| 1770 | static simd_int8 SIMD_CFUNC simd_int(simd_char8 __x) { return __builtin_convertvector(__x, simd_int8); } |
| 1771 | static simd_int16 SIMD_CFUNC simd_int(simd_char16 __x) { return __builtin_convertvector(__x, simd_int16); } |
| 1772 | static simd_int2 SIMD_CFUNC simd_int(simd_uchar2 __x) { return __builtin_convertvector(__x, simd_int2); } |
| 1773 | static simd_int3 SIMD_CFUNC simd_int(simd_uchar3 __x) { return __builtin_convertvector(__x, simd_int3); } |
| 1774 | static simd_int4 SIMD_CFUNC simd_int(simd_uchar4 __x) { return __builtin_convertvector(__x, simd_int4); } |
| 1775 | static simd_int8 SIMD_CFUNC simd_int(simd_uchar8 __x) { return __builtin_convertvector(__x, simd_int8); } |
| 1776 | static simd_int16 SIMD_CFUNC simd_int(simd_uchar16 __x) { return __builtin_convertvector(__x, simd_int16); } |
| 1777 | static simd_int2 SIMD_CFUNC simd_int(simd_short2 __x) { return __builtin_convertvector(__x, simd_int2); } |
| 1778 | static simd_int3 SIMD_CFUNC simd_int(simd_short3 __x) { return __builtin_convertvector(__x, simd_int3); } |
| 1779 | static simd_int4 SIMD_CFUNC simd_int(simd_short4 __x) { return __builtin_convertvector(__x, simd_int4); } |
| 1780 | static simd_int8 SIMD_CFUNC simd_int(simd_short8 __x) { return __builtin_convertvector(__x, simd_int8); } |
| 1781 | static simd_int16 SIMD_CFUNC simd_int(simd_short16 __x) { return __builtin_convertvector(__x, simd_int16); } |
| 1782 | static simd_int2 SIMD_CFUNC simd_int(simd_ushort2 __x) { return __builtin_convertvector(__x, simd_int2); } |
| 1783 | static simd_int3 SIMD_CFUNC simd_int(simd_ushort3 __x) { return __builtin_convertvector(__x, simd_int3); } |
| 1784 | static simd_int4 SIMD_CFUNC simd_int(simd_ushort4 __x) { return __builtin_convertvector(__x, simd_int4); } |
| 1785 | static simd_int8 SIMD_CFUNC simd_int(simd_ushort8 __x) { return __builtin_convertvector(__x, simd_int8); } |
| 1786 | static simd_int16 SIMD_CFUNC simd_int(simd_ushort16 __x) { return __builtin_convertvector(__x, simd_int16); } |
| 1787 | static simd_int2 SIMD_CFUNC simd_int(simd_half2 __x) { return __builtin_convertvector(__x, simd_int2); } |
| 1788 | static simd_int3 SIMD_CFUNC simd_int(simd_half3 __x) { return __builtin_convertvector(__x, simd_int3); } |
| 1789 | static simd_int4 SIMD_CFUNC simd_int(simd_half4 __x) { return __builtin_convertvector(__x, simd_int4); } |
| 1790 | static simd_int8 SIMD_CFUNC simd_int(simd_half8 __x) { return __builtin_convertvector(__x, simd_int8); } |
| 1791 | static simd_int16 SIMD_CFUNC simd_int(simd_half16 __x) { return __builtin_convertvector(__x, simd_int16); } |
| 1792 | static simd_int2 SIMD_CFUNC simd_int(simd_int2 __x) { return __x; } |
| 1793 | static simd_int3 SIMD_CFUNC simd_int(simd_int3 __x) { return __x; } |
| 1794 | static simd_int4 SIMD_CFUNC simd_int(simd_int4 __x) { return __x; } |
| 1795 | static simd_int8 SIMD_CFUNC simd_int(simd_int8 __x) { return __x; } |
| 1796 | static simd_int16 SIMD_CFUNC simd_int(simd_int16 __x) { return __x; } |
| 1797 | static simd_int2 SIMD_CFUNC simd_int(simd_uint2 __x) { return (simd_int2)__x; } |
| 1798 | static simd_int3 SIMD_CFUNC simd_int(simd_uint3 __x) { return (simd_int3)__x; } |
| 1799 | static simd_int4 SIMD_CFUNC simd_int(simd_uint4 __x) { return (simd_int4)__x; } |
| 1800 | static simd_int8 SIMD_CFUNC simd_int(simd_uint8 __x) { return (simd_int8)__x; } |
| 1801 | static simd_int16 SIMD_CFUNC simd_int(simd_uint16 __x) { return (simd_int16)__x; } |
| 1802 | static simd_int2 SIMD_CFUNC simd_int(simd_float2 __x) { return __builtin_convertvector(__x, simd_int2); } |
| 1803 | static simd_int3 SIMD_CFUNC simd_int(simd_float3 __x) { return __builtin_convertvector(__x, simd_int3); } |
| 1804 | static simd_int4 SIMD_CFUNC simd_int(simd_float4 __x) { return __builtin_convertvector(__x, simd_int4); } |
| 1805 | static simd_int8 SIMD_CFUNC simd_int(simd_float8 __x) { return __builtin_convertvector(__x, simd_int8); } |
| 1806 | static simd_int16 SIMD_CFUNC simd_int(simd_float16 __x) { return __builtin_convertvector(__x, simd_int16); } |
| 1807 | static simd_int2 SIMD_CFUNC simd_int(simd_long2 __x) { return __builtin_convertvector(__x & 0xffffffff, simd_int2); } |
| 1808 | static simd_int3 SIMD_CFUNC simd_int(simd_long3 __x) { return __builtin_convertvector(__x & 0xffffffff, simd_int3); } |
| 1809 | static simd_int4 SIMD_CFUNC simd_int(simd_long4 __x) { return __builtin_convertvector(__x & 0xffffffff, simd_int4); } |
| 1810 | static simd_int8 SIMD_CFUNC simd_int(simd_long8 __x) { return __builtin_convertvector(__x & 0xffffffff, simd_int8); } |
| 1811 | static simd_int2 SIMD_CFUNC simd_int(simd_ulong2 __x) { return simd_int(simd_long(__x)); } |
| 1812 | static simd_int3 SIMD_CFUNC simd_int(simd_ulong3 __x) { return simd_int(simd_long(__x)); } |
| 1813 | static simd_int4 SIMD_CFUNC simd_int(simd_ulong4 __x) { return simd_int(simd_long(__x)); } |
| 1814 | static simd_int8 SIMD_CFUNC simd_int(simd_ulong8 __x) { return simd_int(simd_long(__x)); } |
| 1815 | static simd_int2 SIMD_CFUNC simd_int(simd_double2 __x) { return __builtin_convertvector(__x, simd_int2); } |
| 1816 | static simd_int3 SIMD_CFUNC simd_int(simd_double3 __x) { return __builtin_convertvector(__x, simd_int3); } |
| 1817 | static simd_int4 SIMD_CFUNC simd_int(simd_double4 __x) { return __builtin_convertvector(__x, simd_int4); } |
| 1818 | static simd_int8 SIMD_CFUNC simd_int(simd_double8 __x) { return __builtin_convertvector(__x, simd_int8); } |
| 1819 | |
| 1820 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_char2 __x) { return simd_int(__x); } |
| 1821 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_char3 __x) { return simd_int(__x); } |
| 1822 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_char4 __x) { return simd_int(__x); } |
| 1823 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_char8 __x) { return simd_int(__x); } |
| 1824 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_char16 __x) { return simd_int(__x); } |
| 1825 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_short2 __x) { return simd_int(__x); } |
| 1826 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_short3 __x) { return simd_int(__x); } |
| 1827 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_short4 __x) { return simd_int(__x); } |
| 1828 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_short8 __x) { return simd_int(__x); } |
| 1829 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_short16 __x) { return simd_int(__x); } |
| 1830 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_half2 __x) { return simd_int(__x); } |
| 1831 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_half3 __x) { return simd_int(__x); } |
| 1832 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_half4 __x) { return simd_int(__x); } |
| 1833 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_half8 __x) { return simd_int(__x); } |
| 1834 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_half16 __x) { return simd_int(__x); } |
| 1835 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_int2 __x) { return __x; } |
| 1836 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_int3 __x) { return __x; } |
| 1837 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_int4 __x) { return __x; } |
| 1838 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_int8 __x) { return __x; } |
| 1839 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_int16 __x) { return __x; } |
| 1840 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_float2 __x) { return simd_bitselect(simd_int(simd_max(__x,-0x1.0p31f)), 0x7fffffff, __x >= 0x1.0p31f); } |
| 1841 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_float3 __x) { return simd_bitselect(simd_int(simd_max(__x,-0x1.0p31f)), 0x7fffffff, __x >= 0x1.0p31f); } |
| 1842 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_float4 __x) { return simd_bitselect(simd_int(simd_max(__x,-0x1.0p31f)), 0x7fffffff, __x >= 0x1.0p31f); } |
| 1843 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_float8 __x) { return simd_bitselect(simd_int(simd_max(__x,-0x1.0p31f)), 0x7fffffff, __x >= 0x1.0p31f); } |
| 1844 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_float16 __x) { return simd_bitselect(simd_int(simd_max(__x,-0x1.0p31f)), 0x7fffffff, __x >= 0x1.0p31f); } |
| 1845 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_long2 __x) { return simd_int(simd_clamp(__x,-0x80000000LL,0x7fffffffLL)); } |
| 1846 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_long3 __x) { return simd_int(simd_clamp(__x,-0x80000000LL,0x7fffffffLL)); } |
| 1847 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_long4 __x) { return simd_int(simd_clamp(__x,-0x80000000LL,0x7fffffffLL)); } |
| 1848 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_long8 __x) { return simd_int(simd_clamp(__x,-0x80000000LL,0x7fffffffLL)); } |
| 1849 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_double2 __x) { return simd_int(simd_clamp(__x,-0x1.0p31,0x1.fffffffcp30)); } |
| 1850 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_double3 __x) { return simd_int(simd_clamp(__x,-0x1.0p31,0x1.fffffffcp30)); } |
| 1851 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_double4 __x) { return simd_int(simd_clamp(__x,-0x1.0p31,0x1.fffffffcp30)); } |
| 1852 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_double8 __x) { return simd_int(simd_clamp(__x,-0x1.0p31,0x1.fffffffcp30)); } |
| 1853 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_uchar2 __x) { return simd_int(__x); } |
| 1854 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_uchar3 __x) { return simd_int(__x); } |
| 1855 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_uchar4 __x) { return simd_int(__x); } |
| 1856 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_uchar8 __x) { return simd_int(__x); } |
| 1857 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_uchar16 __x) { return simd_int(__x); } |
| 1858 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_ushort2 __x) { return simd_int(__x); } |
| 1859 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_ushort3 __x) { return simd_int(__x); } |
| 1860 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_ushort4 __x) { return simd_int(__x); } |
| 1861 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_ushort8 __x) { return simd_int(__x); } |
| 1862 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_ushort16 __x) { return simd_int(__x); } |
| 1863 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_uint2 __x) { return simd_int(simd_min(__x,0x7fffffff)); } |
| 1864 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_uint3 __x) { return simd_int(simd_min(__x,0x7fffffff)); } |
| 1865 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_uint4 __x) { return simd_int(simd_min(__x,0x7fffffff)); } |
| 1866 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_uint8 __x) { return simd_int(simd_min(__x,0x7fffffff)); } |
| 1867 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_uint16 __x) { return simd_int(simd_min(__x,0x7fffffff)); } |
| 1868 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_ulong2 __x) { return simd_int(simd_min(__x,0x7fffffff)); } |
| 1869 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_ulong3 __x) { return simd_int(simd_min(__x,0x7fffffff)); } |
| 1870 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_ulong4 __x) { return simd_int(simd_min(__x,0x7fffffff)); } |
| 1871 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_ulong8 __x) { return simd_int(simd_min(__x,0x7fffffff)); } |
| 1872 | |
| 1873 | static simd_int2 SIMD_CFUNC simd_int_rte(simd_float2 __x) { |
| 1874 | #if defined __arm64__ || defined __aarch64__ |
| 1875 | return vcvtn_s32_f32(__x); |
| 1876 | #else |
| 1877 | return simd_make_int2(simd_int_rte(simd_make_float4_undef(__x))); |
| 1878 | #endif |
| 1879 | } |
| 1880 | |
| 1881 | static simd_int3 SIMD_CFUNC simd_int_rte(simd_float3 __x) { |
| 1882 | return simd_make_int3(simd_int_rte(simd_make_float4_undef(__x))); |
| 1883 | } |
| 1884 | |
| 1885 | static simd_int4 SIMD_CFUNC simd_int_rte(simd_float4 __x) { |
| 1886 | #if defined __SSE2__ |
| 1887 | return _mm_cvtps_epi32(__x); |
| 1888 | #elif defined __arm64__ || defined __aarch64__ |
| 1889 | return vcvtnq_s32_f32(__x); |
| 1890 | #else |
| 1891 | simd_float4 magic = __tg_copysign(0x1.0p23, __x); |
| 1892 | simd_int4 x_is_small = __tg_fabs(__x) < 0x1.0p23; |
| 1893 | return __builtin_convertvector(simd_bitselect(__x, (__x + magic) - magic, x_is_small & 0x7fffffff), simd_int4); |
| 1894 | #endif |
| 1895 | } |
| 1896 | |
| 1897 | static simd_int8 SIMD_CFUNC simd_int_rte(simd_float8 __x) { |
| 1898 | #if defined __AVX__ |
| 1899 | return _mm256_cvtps_epi32(__x); |
| 1900 | #else |
| 1901 | return simd_make_int8(simd_int_rte(__x.lo), simd_int_rte(__x.hi)); |
| 1902 | #endif |
| 1903 | } |
| 1904 | |
| 1905 | static simd_int16 SIMD_CFUNC simd_int_rte(simd_float16 __x) { |
| 1906 | #if defined __AVX512F__ |
| 1907 | return _mm512_cvtps_epi32(__x); |
| 1908 | #else |
| 1909 | return simd_make_int16(simd_int_rte(__x.lo), simd_int_rte(__x.hi)); |
| 1910 | #endif |
| 1911 | } |
| 1912 | |
| 1913 | static simd_uint2 SIMD_CFUNC simd_uint(simd_char2 __x) { return simd_uint(simd_int(__x)); } |
| 1914 | static simd_uint3 SIMD_CFUNC simd_uint(simd_char3 __x) { return simd_uint(simd_int(__x)); } |
| 1915 | static simd_uint4 SIMD_CFUNC simd_uint(simd_char4 __x) { return simd_uint(simd_int(__x)); } |
| 1916 | static simd_uint8 SIMD_CFUNC simd_uint(simd_char8 __x) { return simd_uint(simd_int(__x)); } |
| 1917 | static simd_uint16 SIMD_CFUNC simd_uint(simd_char16 __x) { return simd_uint(simd_int(__x)); } |
| 1918 | static simd_uint2 SIMD_CFUNC simd_uint(simd_uchar2 __x) { return simd_uint(simd_int(__x)); } |
| 1919 | static simd_uint3 SIMD_CFUNC simd_uint(simd_uchar3 __x) { return simd_uint(simd_int(__x)); } |
| 1920 | static simd_uint4 SIMD_CFUNC simd_uint(simd_uchar4 __x) { return simd_uint(simd_int(__x)); } |
| 1921 | static simd_uint8 SIMD_CFUNC simd_uint(simd_uchar8 __x) { return simd_uint(simd_int(__x)); } |
| 1922 | static simd_uint16 SIMD_CFUNC simd_uint(simd_uchar16 __x) { return simd_uint(simd_int(__x)); } |
| 1923 | static simd_uint2 SIMD_CFUNC simd_uint(simd_short2 __x) { return simd_uint(simd_int(__x)); } |
| 1924 | static simd_uint3 SIMD_CFUNC simd_uint(simd_short3 __x) { return simd_uint(simd_int(__x)); } |
| 1925 | static simd_uint4 SIMD_CFUNC simd_uint(simd_short4 __x) { return simd_uint(simd_int(__x)); } |
| 1926 | static simd_uint8 SIMD_CFUNC simd_uint(simd_short8 __x) { return simd_uint(simd_int(__x)); } |
| 1927 | static simd_uint16 SIMD_CFUNC simd_uint(simd_short16 __x) { return simd_uint(simd_int(__x)); } |
| 1928 | static simd_uint2 SIMD_CFUNC simd_uint(simd_ushort2 __x) { return simd_uint(simd_int(__x)); } |
| 1929 | static simd_uint3 SIMD_CFUNC simd_uint(simd_ushort3 __x) { return simd_uint(simd_int(__x)); } |
| 1930 | static simd_uint4 SIMD_CFUNC simd_uint(simd_ushort4 __x) { return simd_uint(simd_int(__x)); } |
| 1931 | static simd_uint8 SIMD_CFUNC simd_uint(simd_ushort8 __x) { return simd_uint(simd_int(__x)); } |
| 1932 | static simd_uint16 SIMD_CFUNC simd_uint(simd_ushort16 __x) { return simd_uint(simd_int(__x)); } |
| 1933 | static simd_uint2 SIMD_CFUNC simd_uint(simd_half2 __x) { return simd_uint(simd_int(__x)); } |
| 1934 | static simd_uint3 SIMD_CFUNC simd_uint(simd_half3 __x) { return simd_uint(simd_int(__x)); } |
| 1935 | static simd_uint4 SIMD_CFUNC simd_uint(simd_half4 __x) { return simd_uint(simd_int(__x)); } |
| 1936 | static simd_uint8 SIMD_CFUNC simd_uint(simd_half8 __x) { return simd_uint(simd_int(__x)); } |
| 1937 | static simd_uint16 SIMD_CFUNC simd_uint(simd_half16 __x) { return simd_uint(simd_int(__x)); } |
| 1938 | static simd_uint2 SIMD_CFUNC simd_uint(simd_int2 __x) { return (simd_uint2)__x; } |
| 1939 | static simd_uint3 SIMD_CFUNC simd_uint(simd_int3 __x) { return (simd_uint3)__x; } |
| 1940 | static simd_uint4 SIMD_CFUNC simd_uint(simd_int4 __x) { return (simd_uint4)__x; } |
| 1941 | static simd_uint8 SIMD_CFUNC simd_uint(simd_int8 __x) { return (simd_uint8)__x; } |
| 1942 | static simd_uint16 SIMD_CFUNC simd_uint(simd_int16 __x) { return (simd_uint16)__x; } |
| 1943 | static simd_uint2 SIMD_CFUNC simd_uint(simd_uint2 __x) { return __x; } |
| 1944 | static simd_uint3 SIMD_CFUNC simd_uint(simd_uint3 __x) { return __x; } |
| 1945 | static simd_uint4 SIMD_CFUNC simd_uint(simd_uint4 __x) { return __x; } |
| 1946 | static simd_uint8 SIMD_CFUNC simd_uint(simd_uint8 __x) { return __x; } |
| 1947 | static simd_uint16 SIMD_CFUNC simd_uint(simd_uint16 __x) { return __x; } |
| 1948 | static simd_uint2 SIMD_CFUNC simd_uint(simd_float2 __x) { simd_int2 __big = __x > 0x1.0p31f; return simd_uint(simd_int(__x - simd_bitselect((simd_float2)0,0x1.0p31f,__big))) + simd_bitselect((simd_uint2)0,0x80000000,__big); } |
| 1949 | static simd_uint3 SIMD_CFUNC simd_uint(simd_float3 __x) { simd_int3 __big = __x > 0x1.0p31f; return simd_uint(simd_int(__x - simd_bitselect((simd_float3)0,0x1.0p31f,__big))) + simd_bitselect((simd_uint3)0,0x80000000,__big); } |
| 1950 | static simd_uint4 SIMD_CFUNC simd_uint(simd_float4 __x) { simd_int4 __big = __x > 0x1.0p31f; return simd_uint(simd_int(__x - simd_bitselect((simd_float4)0,0x1.0p31f,__big))) + simd_bitselect((simd_uint4)0,0x80000000,__big); } |
| 1951 | static simd_uint8 SIMD_CFUNC simd_uint(simd_float8 __x) { simd_int8 __big = __x > 0x1.0p31f; return simd_uint(simd_int(__x - simd_bitselect((simd_float8)0,0x1.0p31f,__big))) + simd_bitselect((simd_uint8)0,0x80000000,__big); } |
| 1952 | static simd_uint16 SIMD_CFUNC simd_uint(simd_float16 __x) { simd_int16 __big = __x > 0x1.0p31f; return simd_uint(simd_int(__x - simd_bitselect((simd_float16)0,0x1.0p31f,__big))) + simd_bitselect((simd_uint16)0,0x80000000,__big); } |
| 1953 | static simd_uint2 SIMD_CFUNC simd_uint(simd_long2 __x) { return simd_uint(simd_int(__x)); } |
| 1954 | static simd_uint3 SIMD_CFUNC simd_uint(simd_long3 __x) { return simd_uint(simd_int(__x)); } |
| 1955 | static simd_uint4 SIMD_CFUNC simd_uint(simd_long4 __x) { return simd_uint(simd_int(__x)); } |
| 1956 | static simd_uint8 SIMD_CFUNC simd_uint(simd_long8 __x) { return simd_uint(simd_int(__x)); } |
| 1957 | static simd_uint2 SIMD_CFUNC simd_uint(simd_ulong2 __x) { return simd_uint(simd_int(__x)); } |
| 1958 | static simd_uint3 SIMD_CFUNC simd_uint(simd_ulong3 __x) { return simd_uint(simd_int(__x)); } |
| 1959 | static simd_uint4 SIMD_CFUNC simd_uint(simd_ulong4 __x) { return simd_uint(simd_int(__x)); } |
| 1960 | static simd_uint8 SIMD_CFUNC simd_uint(simd_ulong8 __x) { return simd_uint(simd_int(__x)); } |
| 1961 | static simd_uint2 SIMD_CFUNC simd_uint(simd_double2 __x) { simd_long2 __big = __x > 0x1.fffffffcp30; return simd_uint(simd_int(__x - simd_bitselect((simd_double2)0,0x1.0p31,__big))) + simd_bitselect((simd_uint2)0,0x80000000,simd_int(__big)); } |
| 1962 | static simd_uint3 SIMD_CFUNC simd_uint(simd_double3 __x) { simd_long3 __big = __x > 0x1.fffffffcp30; return simd_uint(simd_int(__x - simd_bitselect((simd_double3)0,0x1.0p31,__big))) + simd_bitselect((simd_uint3)0,0x80000000,simd_int(__big)); } |
| 1963 | static simd_uint4 SIMD_CFUNC simd_uint(simd_double4 __x) { simd_long4 __big = __x > 0x1.fffffffcp30; return simd_uint(simd_int(__x - simd_bitselect((simd_double4)0,0x1.0p31,__big))) + simd_bitselect((simd_uint4)0,0x80000000,simd_int(__big)); } |
| 1964 | static simd_uint8 SIMD_CFUNC simd_uint(simd_double8 __x) { simd_long8 __big = __x > 0x1.fffffffcp30; return simd_uint(simd_int(__x - simd_bitselect((simd_double8)0,0x1.0p31,__big))) + simd_bitselect((simd_uint8)0,0x80000000,simd_int(__big)); } |
| 1965 | |
| 1966 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_char2 __x) { return simd_uint(simd_max(__x,0)); } |
| 1967 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_char3 __x) { return simd_uint(simd_max(__x,0)); } |
| 1968 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_char4 __x) { return simd_uint(simd_max(__x,0)); } |
| 1969 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_char8 __x) { return simd_uint(simd_max(__x,0)); } |
| 1970 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_char16 __x) { return simd_uint(simd_max(__x,0)); } |
| 1971 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_short2 __x) { return simd_uint(simd_max(__x,0)); } |
| 1972 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_short3 __x) { return simd_uint(simd_max(__x,0)); } |
| 1973 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_short4 __x) { return simd_uint(simd_max(__x,0)); } |
| 1974 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_short8 __x) { return simd_uint(simd_max(__x,0)); } |
| 1975 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_short16 __x) { return simd_uint(simd_max(__x,0)); } |
| 1976 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_half2 __x) { return simd_uint(simd_max(__x,0)); } |
| 1977 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_half3 __x) { return simd_uint(simd_max(__x,0)); } |
| 1978 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_half4 __x) { return simd_uint(simd_max(__x,0)); } |
| 1979 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_half8 __x) { return simd_uint(simd_max(__x,0)); } |
| 1980 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_half16 __x) { return simd_uint(simd_max(__x,0)); } |
| 1981 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_int2 __x) { return simd_uint(simd_max(__x,0)); } |
| 1982 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_int3 __x) { return simd_uint(simd_max(__x,0)); } |
| 1983 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_int4 __x) { return simd_uint(simd_max(__x,0)); } |
| 1984 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_int8 __x) { return simd_uint(simd_max(__x,0)); } |
| 1985 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_int16 __x) { return simd_uint(simd_max(__x,0)); } |
| 1986 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_float2 __x) { return simd_bitselect(simd_uint(simd_max(__x,0)), 0xffffffff, __x >= 0x1.0p32f); } |
| 1987 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_float3 __x) { return simd_bitselect(simd_uint(simd_max(__x,0)), 0xffffffff, __x >= 0x1.0p32f); } |
| 1988 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_float4 __x) { return simd_bitselect(simd_uint(simd_max(__x,0)), 0xffffffff, __x >= 0x1.0p32f); } |
| 1989 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_float8 __x) { return simd_bitselect(simd_uint(simd_max(__x,0)), 0xffffffff, __x >= 0x1.0p32f); } |
| 1990 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_float16 __x) { return simd_bitselect(simd_uint(simd_max(__x,0)), 0xffffffff, __x >= 0x1.0p32f); } |
| 1991 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_long2 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } |
| 1992 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_long3 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } |
| 1993 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_long4 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } |
| 1994 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_long8 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } |
| 1995 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_double2 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } |
| 1996 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_double3 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } |
| 1997 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_double4 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } |
| 1998 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_double8 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } |
| 1999 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_uchar2 __x) { return simd_uint(__x); } |
| 2000 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_uchar3 __x) { return simd_uint(__x); } |
| 2001 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_uchar4 __x) { return simd_uint(__x); } |
| 2002 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_uchar8 __x) { return simd_uint(__x); } |
| 2003 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_uchar16 __x) { return simd_uint(__x); } |
| 2004 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_ushort2 __x) { return simd_uint(__x); } |
| 2005 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_ushort3 __x) { return simd_uint(__x); } |
| 2006 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_ushort4 __x) { return simd_uint(__x); } |
| 2007 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_ushort8 __x) { return simd_uint(__x); } |
| 2008 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_ushort16 __x) { return simd_uint(__x); } |
| 2009 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_uint2 __x) { return __x; } |
| 2010 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_uint3 __x) { return __x; } |
| 2011 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_uint4 __x) { return __x; } |
| 2012 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_uint8 __x) { return __x; } |
| 2013 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_uint16 __x) { return __x; } |
| 2014 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_ulong2 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } |
| 2015 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_ulong3 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } |
| 2016 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_ulong4 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } |
| 2017 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_ulong8 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } |
| 2018 | |
| 2019 | static simd_uint2 SIMD_CFUNC simd_uint_rte(simd_float2 __x) { |
| 2020 | #if defined __arm64__ |
| 2021 | return vcvtn_u32_f32(__x); |
| 2022 | #else |
| 2023 | return simd_make_uint2(simd_uint_rte(simd_make_float4_undef(__x))); |
| 2024 | #endif |
| 2025 | } |
| 2026 | |
| 2027 | static simd_uint3 SIMD_CFUNC simd_uint_rte(simd_float3 __x) { |
| 2028 | return simd_make_uint3(simd_uint_rte(simd_make_float4_undef(__x))); |
| 2029 | } |
| 2030 | |
| 2031 | static simd_uint4 SIMD_CFUNC simd_uint_rte(simd_float4 __x) { |
| 2032 | #if defined __AVX512F__ |
| 2033 | return _mm_cvtps_epu32(__x); |
| 2034 | #elif defined __arm64__ |
| 2035 | return vcvtnq_u32_f32(__x); |
| 2036 | #else |
| 2037 | simd_float4 magic = __tg_copysign(0x1.0p23, __x); |
| 2038 | simd_int4 x_is_small = __tg_fabs(__x) < 0x1.0p23; |
| 2039 | return __builtin_convertvector(simd_bitselect(__x, (__x + magic) - magic, x_is_small & 0x7fffffff), simd_uint4); |
| 2040 | #endif |
| 2041 | } |
| 2042 | |
| 2043 | static simd_uint8 SIMD_CFUNC simd_uint_rte(simd_float8 __x) { |
| 2044 | #if defined __AVX512F__ |
| 2045 | return _mm256_cvtps_epu32(__x); |
| 2046 | #else |
| 2047 | return simd_make_uint8(simd_uint_rte(__x.lo), simd_uint_rte(__x.hi)); |
| 2048 | #endif |
| 2049 | } |
| 2050 | |
| 2051 | static simd_uint16 SIMD_CFUNC simd_uint_rte(simd_float16 __x) { |
| 2052 | #if defined __AVX512F__ |
| 2053 | return _mm512_cvtps_epu32(__x); |
| 2054 | #else |
| 2055 | return simd_make_uint16(simd_uint_rte(__x.lo), simd_uint_rte(__x.hi)); |
| 2056 | #endif |
| 2057 | } |
| 2058 | |
| 2059 | static simd_float2 SIMD_CFUNC simd_float(simd_char2 __x) { return (simd_float2)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } |
| 2060 | static simd_float3 SIMD_CFUNC simd_float(simd_char3 __x) { return (simd_float3)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } |
| 2061 | static simd_float4 SIMD_CFUNC simd_float(simd_char4 __x) { return (simd_float4)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } |
| 2062 | static simd_float8 SIMD_CFUNC simd_float(simd_char8 __x) { return (simd_float8)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } |
| 2063 | static simd_float16 SIMD_CFUNC simd_float(simd_char16 __x) { return (simd_float16)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } |
| 2064 | static simd_float2 SIMD_CFUNC simd_float(simd_uchar2 __x) { return (simd_float2)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } |
| 2065 | static simd_float3 SIMD_CFUNC simd_float(simd_uchar3 __x) { return (simd_float3)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } |
| 2066 | static simd_float4 SIMD_CFUNC simd_float(simd_uchar4 __x) { return (simd_float4)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } |
| 2067 | static simd_float8 SIMD_CFUNC simd_float(simd_uchar8 __x) { return (simd_float8)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } |
| 2068 | static simd_float16 SIMD_CFUNC simd_float(simd_uchar16 __x) { return (simd_float16)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } |
| 2069 | static simd_float2 SIMD_CFUNC simd_float(simd_short2 __x) { return (simd_float2)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } |
| 2070 | static simd_float3 SIMD_CFUNC simd_float(simd_short3 __x) { return (simd_float3)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } |
| 2071 | static simd_float4 SIMD_CFUNC simd_float(simd_short4 __x) { return (simd_float4)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } |
| 2072 | static simd_float8 SIMD_CFUNC simd_float(simd_short8 __x) { return (simd_float8)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } |
| 2073 | static simd_float16 SIMD_CFUNC simd_float(simd_short16 __x) { return (simd_float16)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } |
| 2074 | static simd_float2 SIMD_CFUNC simd_float(simd_ushort2 __x) { return (simd_float2)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } |
| 2075 | static simd_float3 SIMD_CFUNC simd_float(simd_ushort3 __x) { return (simd_float3)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } |
| 2076 | static simd_float4 SIMD_CFUNC simd_float(simd_ushort4 __x) { return (simd_float4)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } |
| 2077 | static simd_float8 SIMD_CFUNC simd_float(simd_ushort8 __x) { return (simd_float8)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } |
| 2078 | static simd_float16 SIMD_CFUNC simd_float(simd_ushort16 __x) { return (simd_float16)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } |
| 2079 | static simd_float2 SIMD_CFUNC simd_float(simd_half2 __x) { return __builtin_convertvector(__x,simd_float2); } |
| 2080 | static simd_float3 SIMD_CFUNC simd_float(simd_half3 __x) { return __builtin_convertvector(__x,simd_float3); } |
| 2081 | static simd_float4 SIMD_CFUNC simd_float(simd_half4 __x) { return __builtin_convertvector(__x,simd_float4); } |
| 2082 | static simd_float8 SIMD_CFUNC simd_float(simd_half8 __x) { return __builtin_convertvector(__x,simd_float8); } |
| 2083 | static simd_float16 SIMD_CFUNC simd_float(simd_half16 __x) { return __builtin_convertvector(__x,simd_float16); } |
| 2084 | static simd_float2 SIMD_CFUNC simd_float(simd_int2 __x) { return __builtin_convertvector(__x,simd_float2); } |
| 2085 | static simd_float3 SIMD_CFUNC simd_float(simd_int3 __x) { return __builtin_convertvector(__x,simd_float3); } |
| 2086 | static simd_float4 SIMD_CFUNC simd_float(simd_int4 __x) { return __builtin_convertvector(__x,simd_float4); } |
| 2087 | static simd_float8 SIMD_CFUNC simd_float(simd_int8 __x) { return __builtin_convertvector(__x,simd_float8); } |
| 2088 | static simd_float16 SIMD_CFUNC simd_float(simd_int16 __x) { return __builtin_convertvector(__x,simd_float16); } |
| 2089 | static simd_float2 SIMD_CFUNC simd_float(simd_uint2 __x) { return __builtin_convertvector(__x,simd_float2); } |
| 2090 | static simd_float3 SIMD_CFUNC simd_float(simd_uint3 __x) { return __builtin_convertvector(__x,simd_float3); } |
| 2091 | static simd_float4 SIMD_CFUNC simd_float(simd_uint4 __x) { return __builtin_convertvector(__x,simd_float4); } |
| 2092 | static simd_float8 SIMD_CFUNC simd_float(simd_uint8 __x) { return __builtin_convertvector(__x,simd_float8); } |
| 2093 | static simd_float16 SIMD_CFUNC simd_float(simd_uint16 __x) { return __builtin_convertvector(__x,simd_float16); } |
| 2094 | static simd_float2 SIMD_CFUNC simd_float(simd_float2 __x) { return __x; } |
| 2095 | static simd_float3 SIMD_CFUNC simd_float(simd_float3 __x) { return __x; } |
| 2096 | static simd_float4 SIMD_CFUNC simd_float(simd_float4 __x) { return __x; } |
| 2097 | static simd_float8 SIMD_CFUNC simd_float(simd_float8 __x) { return __x; } |
| 2098 | static simd_float16 SIMD_CFUNC simd_float(simd_float16 __x) { return __x; } |
| 2099 | static simd_float2 SIMD_CFUNC simd_float(simd_long2 __x) { return __builtin_convertvector(__x,simd_float2); } |
| 2100 | static simd_float3 SIMD_CFUNC simd_float(simd_long3 __x) { return __builtin_convertvector(__x,simd_float3); } |
| 2101 | static simd_float4 SIMD_CFUNC simd_float(simd_long4 __x) { return __builtin_convertvector(__x,simd_float4); } |
| 2102 | static simd_float8 SIMD_CFUNC simd_float(simd_long8 __x) { return __builtin_convertvector(__x,simd_float8); } |
| 2103 | static simd_float2 SIMD_CFUNC simd_float(simd_ulong2 __x) { return __builtin_convertvector(__x,simd_float2); } |
| 2104 | static simd_float3 SIMD_CFUNC simd_float(simd_ulong3 __x) { return __builtin_convertvector(__x,simd_float3); } |
| 2105 | static simd_float4 SIMD_CFUNC simd_float(simd_ulong4 __x) { return __builtin_convertvector(__x,simd_float4); } |
| 2106 | static simd_float8 SIMD_CFUNC simd_float(simd_ulong8 __x) { return __builtin_convertvector(__x,simd_float8); } |
| 2107 | static simd_float2 SIMD_CFUNC simd_float(simd_double2 __x) { return __builtin_convertvector(__x,simd_float2); } |
| 2108 | static simd_float3 SIMD_CFUNC simd_float(simd_double3 __x) { return __builtin_convertvector(__x,simd_float3); } |
| 2109 | static simd_float4 SIMD_CFUNC simd_float(simd_double4 __x) { return __builtin_convertvector(__x,simd_float4); } |
| 2110 | static simd_float8 SIMD_CFUNC simd_float(simd_double8 __x) { return __builtin_convertvector(__x,simd_float8); } |
| 2111 | |
| 2112 | |
| 2113 | static simd_long2 SIMD_CFUNC simd_long(simd_char2 __x) { return __builtin_convertvector(__x,simd_long2); } |
| 2114 | static simd_long3 SIMD_CFUNC simd_long(simd_char3 __x) { return __builtin_convertvector(__x,simd_long3); } |
| 2115 | static simd_long4 SIMD_CFUNC simd_long(simd_char4 __x) { return __builtin_convertvector(__x,simd_long4); } |
| 2116 | static simd_long8 SIMD_CFUNC simd_long(simd_char8 __x) { return __builtin_convertvector(__x,simd_long8); } |
| 2117 | static simd_long2 SIMD_CFUNC simd_long(simd_uchar2 __x) { return __builtin_convertvector(__x,simd_long2); } |
| 2118 | static simd_long3 SIMD_CFUNC simd_long(simd_uchar3 __x) { return __builtin_convertvector(__x,simd_long3); } |
| 2119 | static simd_long4 SIMD_CFUNC simd_long(simd_uchar4 __x) { return __builtin_convertvector(__x,simd_long4); } |
| 2120 | static simd_long8 SIMD_CFUNC simd_long(simd_uchar8 __x) { return __builtin_convertvector(__x,simd_long8); } |
| 2121 | static simd_long2 SIMD_CFUNC simd_long(simd_short2 __x) { return __builtin_convertvector(__x,simd_long2); } |
| 2122 | static simd_long3 SIMD_CFUNC simd_long(simd_short3 __x) { return __builtin_convertvector(__x,simd_long3); } |
| 2123 | static simd_long4 SIMD_CFUNC simd_long(simd_short4 __x) { return __builtin_convertvector(__x,simd_long4); } |
| 2124 | static simd_long8 SIMD_CFUNC simd_long(simd_short8 __x) { return __builtin_convertvector(__x,simd_long8); } |
| 2125 | static simd_long2 SIMD_CFUNC simd_long(simd_ushort2 __x) { return __builtin_convertvector(__x,simd_long2); } |
| 2126 | static simd_long3 SIMD_CFUNC simd_long(simd_ushort3 __x) { return __builtin_convertvector(__x,simd_long3); } |
| 2127 | static simd_long4 SIMD_CFUNC simd_long(simd_ushort4 __x) { return __builtin_convertvector(__x,simd_long4); } |
| 2128 | static simd_long8 SIMD_CFUNC simd_long(simd_ushort8 __x) { return __builtin_convertvector(__x,simd_long8); } |
| 2129 | static simd_long2 SIMD_CFUNC simd_long(simd_half2 __x) { return __builtin_convertvector(__x,simd_long2); } |
| 2130 | static simd_long3 SIMD_CFUNC simd_long(simd_half3 __x) { return __builtin_convertvector(__x,simd_long3); } |
| 2131 | static simd_long4 SIMD_CFUNC simd_long(simd_half4 __x) { return __builtin_convertvector(__x,simd_long4); } |
| 2132 | static simd_long8 SIMD_CFUNC simd_long(simd_half8 __x) { return __builtin_convertvector(__x,simd_long8); } |
| 2133 | static simd_long2 SIMD_CFUNC simd_long(simd_int2 __x) { return __builtin_convertvector(__x,simd_long2); } |
| 2134 | static simd_long3 SIMD_CFUNC simd_long(simd_int3 __x) { return __builtin_convertvector(__x,simd_long3); } |
| 2135 | static simd_long4 SIMD_CFUNC simd_long(simd_int4 __x) { return __builtin_convertvector(__x,simd_long4); } |
| 2136 | static simd_long8 SIMD_CFUNC simd_long(simd_int8 __x) { return __builtin_convertvector(__x,simd_long8); } |
| 2137 | static simd_long2 SIMD_CFUNC simd_long(simd_uint2 __x) { return __builtin_convertvector(__x,simd_long2); } |
| 2138 | static simd_long3 SIMD_CFUNC simd_long(simd_uint3 __x) { return __builtin_convertvector(__x,simd_long3); } |
| 2139 | static simd_long4 SIMD_CFUNC simd_long(simd_uint4 __x) { return __builtin_convertvector(__x,simd_long4); } |
| 2140 | static simd_long8 SIMD_CFUNC simd_long(simd_uint8 __x) { return __builtin_convertvector(__x,simd_long8); } |
| 2141 | static simd_long2 SIMD_CFUNC simd_long(simd_float2 __x) { return __builtin_convertvector(__x,simd_long2); } |
| 2142 | static simd_long3 SIMD_CFUNC simd_long(simd_float3 __x) { return __builtin_convertvector(__x,simd_long3); } |
| 2143 | static simd_long4 SIMD_CFUNC simd_long(simd_float4 __x) { return __builtin_convertvector(__x,simd_long4); } |
| 2144 | static simd_long8 SIMD_CFUNC simd_long(simd_float8 __x) { return __builtin_convertvector(__x,simd_long8); } |
| 2145 | static simd_long2 SIMD_CFUNC simd_long(simd_long2 __x) { return __x; } |
| 2146 | static simd_long3 SIMD_CFUNC simd_long(simd_long3 __x) { return __x; } |
| 2147 | static simd_long4 SIMD_CFUNC simd_long(simd_long4 __x) { return __x; } |
| 2148 | static simd_long8 SIMD_CFUNC simd_long(simd_long8 __x) { return __x; } |
| 2149 | static simd_long2 SIMD_CFUNC simd_long(simd_ulong2 __x) { return (simd_long2)__x; } |
| 2150 | static simd_long3 SIMD_CFUNC simd_long(simd_ulong3 __x) { return (simd_long3)__x; } |
| 2151 | static simd_long4 SIMD_CFUNC simd_long(simd_ulong4 __x) { return (simd_long4)__x; } |
| 2152 | static simd_long8 SIMD_CFUNC simd_long(simd_ulong8 __x) { return (simd_long8)__x; } |
| 2153 | static simd_long2 SIMD_CFUNC simd_long(simd_double2 __x) { return __builtin_convertvector(__x,simd_long2); } |
| 2154 | static simd_long3 SIMD_CFUNC simd_long(simd_double3 __x) { return __builtin_convertvector(__x,simd_long3); } |
| 2155 | static simd_long4 SIMD_CFUNC simd_long(simd_double4 __x) { return __builtin_convertvector(__x,simd_long4); } |
| 2156 | static simd_long8 SIMD_CFUNC simd_long(simd_double8 __x) { return __builtin_convertvector(__x,simd_long8); } |
| 2157 | |
| 2158 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_char2 __x) { return simd_long(__x); } |
| 2159 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_char3 __x) { return simd_long(__x); } |
| 2160 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_char4 __x) { return simd_long(__x); } |
| 2161 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_char8 __x) { return simd_long(__x); } |
| 2162 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_short2 __x) { return simd_long(__x); } |
| 2163 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_short3 __x) { return simd_long(__x); } |
| 2164 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_short4 __x) { return simd_long(__x); } |
| 2165 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_short8 __x) { return simd_long(__x); } |
| 2166 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_half2 __x) { return simd_long(__x); } |
| 2167 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_half3 __x) { return simd_long(__x); } |
| 2168 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_half4 __x) { return simd_long(__x); } |
| 2169 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_half8 __x) { return simd_long(__x); } |
| 2170 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_int2 __x) { return simd_long(__x); } |
| 2171 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_int3 __x) { return simd_long(__x); } |
| 2172 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_int4 __x) { return simd_long(__x); } |
| 2173 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_int8 __x) { return simd_long(__x); } |
| 2174 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_float2 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63f)), 0x7fffffffffffffff, simd_long(__x >= 0x1.0p63f)); } |
| 2175 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_float3 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63f)), 0x7fffffffffffffff, simd_long(__x >= 0x1.0p63f)); } |
| 2176 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_float4 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63f)), 0x7fffffffffffffff, simd_long(__x >= 0x1.0p63f)); } |
| 2177 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_float8 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63f)), 0x7fffffffffffffff, simd_long(__x >= 0x1.0p63f)); } |
| 2178 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_long2 __x) { return __x; } |
| 2179 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_long3 __x) { return __x; } |
| 2180 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_long4 __x) { return __x; } |
| 2181 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_long8 __x) { return __x; } |
| 2182 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_double2 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63)), 0x7fffffffffffffff, __x >= 0x1.0p63); } |
| 2183 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_double3 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63)), 0x7fffffffffffffff, __x >= 0x1.0p63); } |
| 2184 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_double4 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63)), 0x7fffffffffffffff, __x >= 0x1.0p63); } |
| 2185 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_double8 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63)), 0x7fffffffffffffff, __x >= 0x1.0p63); } |
| 2186 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_uchar2 __x) { return simd_long(__x); } |
| 2187 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_uchar3 __x) { return simd_long(__x); } |
| 2188 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_uchar4 __x) { return simd_long(__x); } |
| 2189 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_uchar8 __x) { return simd_long(__x); } |
| 2190 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_ushort2 __x) { return simd_long(__x); } |
| 2191 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_ushort3 __x) { return simd_long(__x); } |
| 2192 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_ushort4 __x) { return simd_long(__x); } |
| 2193 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_ushort8 __x) { return simd_long(__x); } |
| 2194 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_uint2 __x) { return simd_long(__x); } |
| 2195 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_uint3 __x) { return simd_long(__x); } |
| 2196 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_uint4 __x) { return simd_long(__x); } |
| 2197 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_uint8 __x) { return simd_long(__x); } |
| 2198 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_ulong2 __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); } |
| 2199 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_ulong3 __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); } |
| 2200 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_ulong4 __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); } |
| 2201 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_ulong8 __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); } |
| 2202 | |
| 2203 | static simd_long2 SIMD_CFUNC simd_long_rte(simd_double2 __x) { |
| 2204 | #if defined __AVX512F__ |
| 2205 | return _mm_cvtpd_epi64(__x); |
| 2206 | #elif defined __arm64__ || defined __aarch64__ |
| 2207 | return vcvtnq_s64_f64(__x); |
| 2208 | #else |
| 2209 | simd_double2 magic = __tg_copysign(0x1.0p52, __x); |
| 2210 | simd_long2 x_is_small = __tg_fabs(__x) < 0x1.0p52; |
| 2211 | return __builtin_convertvector(simd_bitselect(__x, (__x + magic) - magic, x_is_small & 0x7fffffffffffffff), simd_long2); |
| 2212 | #endif |
| 2213 | } |
| 2214 | |
| 2215 | static simd_long3 SIMD_CFUNC simd_long_rte(simd_double3 __x) { |
| 2216 | return simd_make_long3(simd_long_rte(simd_make_double4_undef(__x))); |
| 2217 | } |
| 2218 | |
| 2219 | static simd_long4 SIMD_CFUNC simd_long_rte(simd_double4 __x) { |
| 2220 | #if defined __AVX512F__ |
| 2221 | return _mm256_cvtpd_epi64(__x); |
| 2222 | #else |
| 2223 | return simd_make_long4(simd_long_rte(__x.lo), simd_long_rte(__x.hi)); |
| 2224 | #endif |
| 2225 | } |
| 2226 | |
| 2227 | static simd_long8 SIMD_CFUNC simd_long_rte(simd_double8 __x) { |
| 2228 | #if defined __AVX512F__ |
| 2229 | return _mm512_cvtpd_epi64(__x); |
| 2230 | #else |
| 2231 | return simd_make_long8(simd_long_rte(__x.lo), simd_long_rte(__x.hi)); |
| 2232 | #endif |
| 2233 | } |
| 2234 | |
| 2235 | |
| 2236 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_char2 __x) { return simd_ulong(simd_long(__x)); } |
| 2237 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_char3 __x) { return simd_ulong(simd_long(__x)); } |
| 2238 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_char4 __x) { return simd_ulong(simd_long(__x)); } |
| 2239 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_char8 __x) { return simd_ulong(simd_long(__x)); } |
| 2240 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_uchar2 __x) { return simd_ulong(simd_long(__x)); } |
| 2241 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_uchar3 __x) { return simd_ulong(simd_long(__x)); } |
| 2242 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_uchar4 __x) { return simd_ulong(simd_long(__x)); } |
| 2243 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_uchar8 __x) { return simd_ulong(simd_long(__x)); } |
| 2244 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_short2 __x) { return simd_ulong(simd_long(__x)); } |
| 2245 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_short3 __x) { return simd_ulong(simd_long(__x)); } |
| 2246 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_short4 __x) { return simd_ulong(simd_long(__x)); } |
| 2247 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_short8 __x) { return simd_ulong(simd_long(__x)); } |
| 2248 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_ushort2 __x) { return simd_ulong(simd_long(__x)); } |
| 2249 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_ushort3 __x) { return simd_ulong(simd_long(__x)); } |
| 2250 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_ushort4 __x) { return simd_ulong(simd_long(__x)); } |
| 2251 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_ushort8 __x) { return simd_ulong(simd_long(__x)); } |
| 2252 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_half2 __x) { return simd_ulong(simd_long(__x)); } |
| 2253 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_half3 __x) { return simd_ulong(simd_long(__x)); } |
| 2254 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_half4 __x) { return simd_ulong(simd_long(__x)); } |
| 2255 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_half8 __x) { return simd_ulong(simd_long(__x)); } |
| 2256 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_int2 __x) { return simd_ulong(simd_long(__x)); } |
| 2257 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_int3 __x) { return simd_ulong(simd_long(__x)); } |
| 2258 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_int4 __x) { return simd_ulong(simd_long(__x)); } |
| 2259 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_int8 __x) { return simd_ulong(simd_long(__x)); } |
| 2260 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_uint2 __x) { return simd_ulong(simd_long(__x)); } |
| 2261 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_uint3 __x) { return simd_ulong(simd_long(__x)); } |
| 2262 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_uint4 __x) { return simd_ulong(simd_long(__x)); } |
| 2263 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_uint8 __x) { return simd_ulong(simd_long(__x)); } |
| 2264 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_float2 __x) { simd_int2 __big = __x >= 0x1.0p63f; return simd_ulong(simd_long(__x - simd_bitselect((simd_float2)0,0x1.0p63f,__big))) + simd_bitselect((simd_ulong2)0,0x8000000000000000,simd_long(__big)); } |
| 2265 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_float3 __x) { simd_int3 __big = __x >= 0x1.0p63f; return simd_ulong(simd_long(__x - simd_bitselect((simd_float3)0,0x1.0p63f,__big))) + simd_bitselect((simd_ulong3)0,0x8000000000000000,simd_long(__big)); } |
| 2266 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_float4 __x) { simd_int4 __big = __x >= 0x1.0p63f; return simd_ulong(simd_long(__x - simd_bitselect((simd_float4)0,0x1.0p63f,__big))) + simd_bitselect((simd_ulong4)0,0x8000000000000000,simd_long(__big)); } |
| 2267 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_float8 __x) { simd_int8 __big = __x >= 0x1.0p63f; return simd_ulong(simd_long(__x - simd_bitselect((simd_float8)0,0x1.0p63f,__big))) + simd_bitselect((simd_ulong8)0,0x8000000000000000,simd_long(__big)); } |
| 2268 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_long2 __x) { return (simd_ulong2)__x; } |
| 2269 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_long3 __x) { return (simd_ulong3)__x; } |
| 2270 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_long4 __x) { return (simd_ulong4)__x; } |
| 2271 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_long8 __x) { return (simd_ulong8)__x; } |
| 2272 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_ulong2 __x) { return __x; } |
| 2273 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_ulong3 __x) { return __x; } |
| 2274 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_ulong4 __x) { return __x; } |
| 2275 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_ulong8 __x) { return __x; } |
| 2276 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_double2 __x) { simd_long2 __big = __x >= 0x1.0p63; return simd_ulong(simd_long(__x - simd_bitselect((simd_double2)0,0x1.0p63,__big))) + simd_bitselect((simd_ulong2)0,0x8000000000000000,__big); } |
| 2277 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_double3 __x) { simd_long3 __big = __x >= 0x1.0p63; return simd_ulong(simd_long(__x - simd_bitselect((simd_double3)0,0x1.0p63,__big))) + simd_bitselect((simd_ulong3)0,0x8000000000000000,__big); } |
| 2278 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_double4 __x) { simd_long4 __big = __x >= 0x1.0p63; return simd_ulong(simd_long(__x - simd_bitselect((simd_double4)0,0x1.0p63,__big))) + simd_bitselect((simd_ulong4)0,0x8000000000000000,__big); } |
| 2279 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_double8 __x) { simd_long8 __big = __x >= 0x1.0p63; return simd_ulong(simd_long(__x - simd_bitselect((simd_double8)0,0x1.0p63,__big))) + simd_bitselect((simd_ulong8)0,0x8000000000000000,__big); } |
| 2280 | |
| 2281 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_char2 __x) { return simd_ulong(simd_max(__x,0)); } |
| 2282 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_char3 __x) { return simd_ulong(simd_max(__x,0)); } |
| 2283 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_char4 __x) { return simd_ulong(simd_max(__x,0)); } |
| 2284 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_char8 __x) { return simd_ulong(simd_max(__x,0)); } |
| 2285 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_short2 __x) { return simd_ulong(simd_max(__x,0)); } |
| 2286 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_short3 __x) { return simd_ulong(simd_max(__x,0)); } |
| 2287 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_short4 __x) { return simd_ulong(simd_max(__x,0)); } |
| 2288 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_short8 __x) { return simd_ulong(simd_max(__x,0)); } |
| 2289 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_half2 __x) { return simd_ulong(simd_max(__x,0)); } |
| 2290 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_half3 __x) { return simd_ulong(simd_max(__x,0)); } |
| 2291 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_half4 __x) { return simd_ulong(simd_max(__x,0)); } |
| 2292 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_half8 __x) { return simd_ulong(simd_max(__x,0)); } |
| 2293 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_int2 __x) { return simd_ulong(simd_max(__x,0)); } |
| 2294 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_int3 __x) { return simd_ulong(simd_max(__x,0)); } |
| 2295 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_int4 __x) { return simd_ulong(simd_max(__x,0)); } |
| 2296 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_int8 __x) { return simd_ulong(simd_max(__x,0)); } |
| 2297 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_float2 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.f)), 0xffffffffffffffff, simd_long(__x >= 0x1.0p64f)); } |
| 2298 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_float3 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.f)), 0xffffffffffffffff, simd_long(__x >= 0x1.0p64f)); } |
| 2299 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_float4 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.f)), 0xffffffffffffffff, simd_long(__x >= 0x1.0p64f)); } |
| 2300 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_float8 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.f)), 0xffffffffffffffff, simd_long(__x >= 0x1.0p64f)); } |
| 2301 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_long2 __x) { return simd_ulong(simd_max(__x,0)); } |
| 2302 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_long3 __x) { return simd_ulong(simd_max(__x,0)); } |
| 2303 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_long4 __x) { return simd_ulong(simd_max(__x,0)); } |
| 2304 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_long8 __x) { return simd_ulong(simd_max(__x,0)); } |
| 2305 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_double2 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.0)), 0xffffffffffffffff, __x >= 0x1.0p64); } |
| 2306 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_double3 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.0)), 0xffffffffffffffff, __x >= 0x1.0p64); } |
| 2307 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_double4 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.0)), 0xffffffffffffffff, __x >= 0x1.0p64); } |
| 2308 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_double8 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.0)), 0xffffffffffffffff, __x >= 0x1.0p64); } |
| 2309 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_uchar2 __x) { return simd_ulong(__x); } |
| 2310 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_uchar3 __x) { return simd_ulong(__x); } |
| 2311 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_uchar4 __x) { return simd_ulong(__x); } |
| 2312 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_uchar8 __x) { return simd_ulong(__x); } |
| 2313 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_ushort2 __x) { return simd_ulong(__x); } |
| 2314 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_ushort3 __x) { return simd_ulong(__x); } |
| 2315 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_ushort4 __x) { return simd_ulong(__x); } |
| 2316 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_ushort8 __x) { return simd_ulong(__x); } |
| 2317 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_uint2 __x) { return simd_ulong(__x); } |
| 2318 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_uint3 __x) { return simd_ulong(__x); } |
| 2319 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_uint4 __x) { return simd_ulong(__x); } |
| 2320 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_uint8 __x) { return simd_ulong(__x); } |
| 2321 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_ulong2 __x) { return __x; } |
| 2322 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_ulong3 __x) { return __x; } |
| 2323 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_ulong4 __x) { return __x; } |
| 2324 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_ulong8 __x) { return __x; } |
| 2325 | |
| 2326 | static simd_ulong2 SIMD_CFUNC simd_ulong_rte(simd_double2 __x) { |
| 2327 | #if defined __AVX512F__ |
| 2328 | return _mm_cvtpd_epu64(__x); |
| 2329 | #elif defined __arm64__ |
| 2330 | return vcvtnq_u64_f64(__x); |
| 2331 | #else |
| 2332 | simd_double2 magic = __tg_copysign(0x1.0p52, __x); |
| 2333 | simd_long2 x_is_small = __tg_fabs(__x) < 0x1.0p52; |
| 2334 | return __builtin_convertvector(simd_bitselect(__x, (__x + magic) - magic, x_is_small & 0x7fffffffffffffff), simd_ulong2); |
| 2335 | #endif |
| 2336 | } |
| 2337 | |
| 2338 | static simd_ulong3 SIMD_CFUNC simd_ulong_rte(simd_double3 __x) { |
| 2339 | return simd_make_ulong3(simd_ulong_rte(simd_make_double4_undef(__x))); |
| 2340 | } |
| 2341 | |
| 2342 | static simd_ulong4 SIMD_CFUNC simd_ulong_rte(simd_double4 __x) { |
| 2343 | #if defined __AVX512F__ |
| 2344 | return _mm256_cvtpd_epu64(__x); |
| 2345 | #else |
| 2346 | return simd_make_ulong4(simd_ulong_rte(__x.lo), simd_ulong_rte(__x.hi)); |
| 2347 | #endif |
| 2348 | } |
| 2349 | |
| 2350 | static simd_ulong8 SIMD_CFUNC simd_ulong_rte(simd_double8 __x) { |
| 2351 | #if defined __AVX512F__ |
| 2352 | return _mm512_cvtpd_epu64(__x); |
| 2353 | #else |
| 2354 | return simd_make_ulong8(simd_ulong_rte(__x.lo), simd_ulong_rte(__x.hi)); |
| 2355 | #endif |
| 2356 | } |
| 2357 | |
| 2358 | static simd_double2 SIMD_CFUNC simd_double(simd_char2 __x) { return simd_double(simd_int(__x)); } |
| 2359 | static simd_double3 SIMD_CFUNC simd_double(simd_char3 __x) { return simd_double(simd_int(__x)); } |
| 2360 | static simd_double4 SIMD_CFUNC simd_double(simd_char4 __x) { return simd_double(simd_int(__x)); } |
| 2361 | static simd_double8 SIMD_CFUNC simd_double(simd_char8 __x) { return simd_double(simd_int(__x)); } |
| 2362 | static simd_double2 SIMD_CFUNC simd_double(simd_uchar2 __x) { return simd_double(simd_int(__x)); } |
| 2363 | static simd_double3 SIMD_CFUNC simd_double(simd_uchar3 __x) { return simd_double(simd_int(__x)); } |
| 2364 | static simd_double4 SIMD_CFUNC simd_double(simd_uchar4 __x) { return simd_double(simd_int(__x)); } |
| 2365 | static simd_double8 SIMD_CFUNC simd_double(simd_uchar8 __x) { return simd_double(simd_int(__x)); } |
| 2366 | static simd_double2 SIMD_CFUNC simd_double(simd_short2 __x) { return simd_double(simd_int(__x)); } |
| 2367 | static simd_double3 SIMD_CFUNC simd_double(simd_short3 __x) { return simd_double(simd_int(__x)); } |
| 2368 | static simd_double4 SIMD_CFUNC simd_double(simd_short4 __x) { return simd_double(simd_int(__x)); } |
| 2369 | static simd_double8 SIMD_CFUNC simd_double(simd_short8 __x) { return simd_double(simd_int(__x)); } |
| 2370 | static simd_double2 SIMD_CFUNC simd_double(simd_ushort2 __x) { return simd_double(simd_int(__x)); } |
| 2371 | static simd_double3 SIMD_CFUNC simd_double(simd_ushort3 __x) { return simd_double(simd_int(__x)); } |
| 2372 | static simd_double4 SIMD_CFUNC simd_double(simd_ushort4 __x) { return simd_double(simd_int(__x)); } |
| 2373 | static simd_double8 SIMD_CFUNC simd_double(simd_ushort8 __x) { return simd_double(simd_int(__x)); } |
| 2374 | static simd_double2 SIMD_CFUNC simd_double(simd_half2 __x) { return __builtin_convertvector(__x, simd_double2); } |
| 2375 | static simd_double3 SIMD_CFUNC simd_double(simd_half3 __x) { return __builtin_convertvector(__x, simd_double3); } |
| 2376 | static simd_double4 SIMD_CFUNC simd_double(simd_half4 __x) { return __builtin_convertvector(__x, simd_double4); } |
| 2377 | static simd_double8 SIMD_CFUNC simd_double(simd_half8 __x) { return __builtin_convertvector(__x, simd_double8); } |
| 2378 | static simd_double2 SIMD_CFUNC simd_double(simd_int2 __x) { return __builtin_convertvector(__x, simd_double2); } |
| 2379 | static simd_double3 SIMD_CFUNC simd_double(simd_int3 __x) { return __builtin_convertvector(__x, simd_double3); } |
| 2380 | static simd_double4 SIMD_CFUNC simd_double(simd_int4 __x) { return __builtin_convertvector(__x, simd_double4); } |
| 2381 | static simd_double8 SIMD_CFUNC simd_double(simd_int8 __x) { return __builtin_convertvector(__x, simd_double8); } |
| 2382 | static simd_double2 SIMD_CFUNC simd_double(simd_uint2 __x) { return __builtin_convertvector(__x, simd_double2); } |
| 2383 | static simd_double3 SIMD_CFUNC simd_double(simd_uint3 __x) { return __builtin_convertvector(__x, simd_double3); } |
| 2384 | static simd_double4 SIMD_CFUNC simd_double(simd_uint4 __x) { return __builtin_convertvector(__x, simd_double4); } |
| 2385 | static simd_double8 SIMD_CFUNC simd_double(simd_uint8 __x) { return __builtin_convertvector(__x, simd_double8); } |
| 2386 | static simd_double2 SIMD_CFUNC simd_double(simd_float2 __x) { return __builtin_convertvector(__x, simd_double2); } |
| 2387 | static simd_double3 SIMD_CFUNC simd_double(simd_float3 __x) { return __builtin_convertvector(__x, simd_double3); } |
| 2388 | static simd_double4 SIMD_CFUNC simd_double(simd_float4 __x) { return __builtin_convertvector(__x, simd_double4); } |
| 2389 | static simd_double8 SIMD_CFUNC simd_double(simd_float8 __x) { return __builtin_convertvector(__x, simd_double8); } |
| 2390 | static simd_double2 SIMD_CFUNC simd_double(simd_long2 __x) { return __builtin_convertvector(__x, simd_double2); } |
| 2391 | static simd_double3 SIMD_CFUNC simd_double(simd_long3 __x) { return __builtin_convertvector(__x, simd_double3); } |
| 2392 | static simd_double4 SIMD_CFUNC simd_double(simd_long4 __x) { return __builtin_convertvector(__x, simd_double4); } |
| 2393 | static simd_double8 SIMD_CFUNC simd_double(simd_long8 __x) { return __builtin_convertvector(__x, simd_double8); } |
| 2394 | static simd_double2 SIMD_CFUNC simd_double(simd_ulong2 __x) { return __builtin_convertvector(__x, simd_double2); } |
| 2395 | static simd_double3 SIMD_CFUNC simd_double(simd_ulong3 __x) { return __builtin_convertvector(__x, simd_double3); } |
| 2396 | static simd_double4 SIMD_CFUNC simd_double(simd_ulong4 __x) { return __builtin_convertvector(__x, simd_double4); } |
| 2397 | static simd_double8 SIMD_CFUNC simd_double(simd_ulong8 __x) { return __builtin_convertvector(__x, simd_double8); } |
| 2398 | static simd_double2 SIMD_CFUNC simd_double(simd_double2 __x) { return __builtin_convertvector(__x, simd_double2); } |
| 2399 | static simd_double3 SIMD_CFUNC simd_double(simd_double3 __x) { return __builtin_convertvector(__x, simd_double3); } |
| 2400 | static simd_double4 SIMD_CFUNC simd_double(simd_double4 __x) { return __builtin_convertvector(__x, simd_double4); } |
| 2401 | static simd_double8 SIMD_CFUNC simd_double(simd_double8 __x) { return __builtin_convertvector(__x, simd_double8); } |
| 2402 | |
| 2403 | |
| 2404 | #ifdef __cplusplus |
| 2405 | } // extern "C" |
| 2406 | |
| 2407 | namespace simd { |
| 2408 | |
| 2409 | #if __has_feature(cxx_constexpr) |
| 2410 | /*! @abstract Convert a vector to another vector of the ScalarType and the same number of elements. */ |
| 2411 | template<typename ScalarType, typename typeN> |
| 2412 | static constexpr Vector_t<ScalarType, traits<typeN>::count> convert(typeN vector) |
| 2413 | { |
| 2414 | if constexpr (traits<typeN>::count == 1) |
| 2415 | return static_cast<Vector_t<ScalarType, traits<typeN>::count>>(vector); |
| 2416 | else if constexpr (std::is_same<ScalarType, char1>::value) |
| 2417 | return simd_char(vector); |
| 2418 | else if constexpr (std::is_same<ScalarType, uchar1>::value) |
| 2419 | return simd_uchar(vector); |
| 2420 | else if constexpr (std::is_same<ScalarType, short1>::value) |
| 2421 | return simd_short(vector); |
| 2422 | else if constexpr (std::is_same<ScalarType, ushort1>::value) |
| 2423 | return simd_ushort(vector); |
| 2424 | else if constexpr (std::is_same<ScalarType, int1>::value) |
| 2425 | return simd_int(vector); |
| 2426 | else if constexpr (std::is_same<ScalarType, uint1>::value) |
| 2427 | return simd_uint(vector); |
| 2428 | else if constexpr (std::is_same<ScalarType, long1>::value) |
| 2429 | return simd_long(vector); |
| 2430 | else if constexpr (std::is_same<ScalarType, ulong1>::value) |
| 2431 | return simd_ulong(vector); |
| 2432 | else if constexpr (std::is_same<ScalarType, half1>::value) |
| 2433 | return simd_half(vector); |
| 2434 | else if constexpr (std::is_same<ScalarType, float1>::value) |
| 2435 | return simd_float(vector); |
| 2436 | else if constexpr (std::is_same<ScalarType, double1>::value) |
| 2437 | return simd_double(vector); |
| 2438 | } |
| 2439 | |
| 2440 | /*! @abstract Convert a vector to another vector of the ScalarType and the same number of elements with saturation. |
| 2441 | * @discussion When the input value is too large to be represented in the return type, the input value |
| 2442 | * will be saturated to the maximum value of the return type. */ |
| 2443 | template<typename ScalarType, typename typeN> |
| 2444 | static constexpr Vector_t<ScalarType, traits<typeN>::count> convert_sat(typeN vector) |
| 2445 | { |
| 2446 | static_assert(traits<typeN>::count != 1); |
| 2447 | if constexpr (std::is_same<ScalarType, char1>::value) |
| 2448 | return simd_char_sat(vector); |
| 2449 | else if constexpr (std::is_same<ScalarType, uchar1>::value) |
| 2450 | return simd_uchar_sat(vector); |
| 2451 | else if constexpr (std::is_same<ScalarType, short1>::value) |
| 2452 | return simd_short_sat(vector); |
| 2453 | else if constexpr (std::is_same<ScalarType, ushort1>::value) |
| 2454 | return simd_ushort_sat(vector); |
| 2455 | else if constexpr (std::is_same<ScalarType, int1>::value) |
| 2456 | return simd_int_sat(vector); |
| 2457 | else if constexpr (std::is_same<ScalarType, uint1>::value) |
| 2458 | return simd_uint_sat(vector); |
| 2459 | else if constexpr (std::is_same<ScalarType, long1>::value) |
| 2460 | return simd_long_sat(vector); |
| 2461 | else if constexpr (std::is_same<ScalarType, ulong1>::value) |
| 2462 | return simd_ulong_sat(vector); |
| 2463 | else |
| 2464 | return convert<ScalarType, typeN>(vector); |
| 2465 | } |
| 2466 | #endif /* __has_feature(cxx_constexpr) */ |
| 2467 | |
| 2468 | } /* namespace simd */ |
| 2469 | #endif // __cplusplus |
| 2470 | #endif // SIMD_COMPILER_HAS_REQUIRED_FEATURES |
| 2471 | #endif // __SIMD_CONVERSION_HEADER__ |
| 2472 | |