Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/util/util_math_float4.h
| Show All 21 Lines | |||||
| #endif | #endif | ||||
| CCL_NAMESPACE_BEGIN | CCL_NAMESPACE_BEGIN | ||||
| /******************************************************************************* | /******************************************************************************* | ||||
| * Declaration. | * Declaration. | ||||
| */ | */ | ||||
| #ifndef __KERNEL_OPENCL__ | |||||
| ccl_device_inline float4 operator-(const float4 &a); | ccl_device_inline float4 operator-(const float4 &a); | ||||
| ccl_device_inline float4 operator*(const float4 &a, const float4 &b); | ccl_device_inline float4 operator*(const float4 &a, const float4 &b); | ||||
| ccl_device_inline float4 operator*(const float4 &a, float f); | ccl_device_inline float4 operator*(const float4 &a, float f); | ||||
| ccl_device_inline float4 operator*(float f, const float4 &a); | ccl_device_inline float4 operator*(float f, const float4 &a); | ||||
| ccl_device_inline float4 operator/(const float4 &a, float f); | ccl_device_inline float4 operator/(const float4 &a, float f); | ||||
| ccl_device_inline float4 operator/(const float4 &a, const float4 &b); | ccl_device_inline float4 operator/(const float4 &a, const float4 &b); | ||||
| ccl_device_inline float4 operator+(const float4 &a, const float f); | ccl_device_inline float4 operator+(const float4 &a, const float f); | ||||
| ccl_device_inline float4 operator+(const float4 &a, const float4 &b); | ccl_device_inline float4 operator+(const float4 &a, const float4 &b); | ||||
| Show All 22 Lines | |||||
| ccl_device_inline float4 normalize(const float4 &a); | ccl_device_inline float4 normalize(const float4 &a); | ||||
| ccl_device_inline float4 safe_normalize(const float4 &a); | ccl_device_inline float4 safe_normalize(const float4 &a); | ||||
| ccl_device_inline float4 min(const float4 &a, const float4 &b); | ccl_device_inline float4 min(const float4 &a, const float4 &b); | ||||
| ccl_device_inline float4 max(const float4 &a, const float4 &b); | ccl_device_inline float4 max(const float4 &a, const float4 &b); | ||||
| ccl_device_inline float4 clamp(const float4 &a, const float4 &mn, const float4 &mx); | ccl_device_inline float4 clamp(const float4 &a, const float4 &mn, const float4 &mx); | ||||
| ccl_device_inline float4 fabs(const float4 &a); | ccl_device_inline float4 fabs(const float4 &a); | ||||
| ccl_device_inline float4 floor(const float4 &a); | ccl_device_inline float4 floor(const float4 &a); | ||||
| ccl_device_inline float4 mix(const float4 &a, const float4 &b, float t); | ccl_device_inline float4 mix(const float4 &a, const float4 &b, float t); | ||||
| #endif /* !__KERNEL_OPENCL__*/ | |||||
| ccl_device_inline float4 safe_divide_float4_float(const float4 a, const float b); | ccl_device_inline float4 safe_divide_float4_float(const float4 a, const float b); | ||||
| #ifdef __KERNEL_SSE__ | #ifdef __KERNEL_SSE__ | ||||
| template<size_t index_0, size_t index_1, size_t index_2, size_t index_3> | template<size_t index_0, size_t index_1, size_t index_2, size_t index_3> | ||||
| __forceinline const float4 shuffle(const float4 &b); | __forceinline const float4 shuffle(const float4 &b); | ||||
| template<size_t index_0, size_t index_1, size_t index_2, size_t index_3> | template<size_t index_0, size_t index_1, size_t index_2, size_t index_3> | ||||
| __forceinline const float4 shuffle(const float4 &a, const float4 &b); | __forceinline const float4 shuffle(const float4 &a, const float4 &b); | ||||
| Show All 29 Lines | |||||
| #endif | #endif | ||||
| } | } | ||||
| ccl_device_inline float4 one_float4() | ccl_device_inline float4 one_float4() | ||||
| { | { | ||||
| return make_float4(1.0f, 1.0f, 1.0f, 1.0f); | return make_float4(1.0f, 1.0f, 1.0f, 1.0f); | ||||
| } | } | ||||
| #ifndef __KERNEL_OPENCL__ | |||||
| ccl_device_inline float4 operator-(const float4 &a) | ccl_device_inline float4 operator-(const float4 &a) | ||||
| { | { | ||||
| # ifdef __KERNEL_SSE__ | #ifdef __KERNEL_SSE__ | ||||
| __m128 mask = _mm_castsi128_ps(_mm_set1_epi32(0x80000000)); | __m128 mask = _mm_castsi128_ps(_mm_set1_epi32(0x80000000)); | ||||
| return float4(_mm_xor_ps(a.m128, mask)); | return float4(_mm_xor_ps(a.m128, mask)); | ||||
| # else | #else | ||||
| return make_float4(-a.x, -a.y, -a.z, -a.w); | return make_float4(-a.x, -a.y, -a.z, -a.w); | ||||
| # endif | #endif | ||||
| } | } | ||||
| ccl_device_inline float4 operator*(const float4 &a, const float4 &b) | ccl_device_inline float4 operator*(const float4 &a, const float4 &b) | ||||
| { | { | ||||
| # ifdef __KERNEL_SSE__ | #ifdef __KERNEL_SSE__ | ||||
| return float4(_mm_mul_ps(a.m128, b.m128)); | return float4(_mm_mul_ps(a.m128, b.m128)); | ||||
| # else | #else | ||||
| return make_float4(a.x * b.x, a.y * b.y, a.z * b.z, a.w * b.w); | return make_float4(a.x * b.x, a.y * b.y, a.z * b.z, a.w * b.w); | ||||
| # endif | #endif | ||||
| } | } | ||||
| ccl_device_inline float4 operator*(const float4 &a, float f) | ccl_device_inline float4 operator*(const float4 &a, float f) | ||||
| { | { | ||||
| # if defined(__KERNEL_SSE__) | #if defined(__KERNEL_SSE__) | ||||
| return a * make_float4(f); | return a * make_float4(f); | ||||
| # else | #else | ||||
| return make_float4(a.x * f, a.y * f, a.z * f, a.w * f); | return make_float4(a.x * f, a.y * f, a.z * f, a.w * f); | ||||
| # endif | #endif | ||||
| } | } | ||||
| ccl_device_inline float4 operator*(float f, const float4 &a) | ccl_device_inline float4 operator*(float f, const float4 &a) | ||||
| { | { | ||||
| return a * f; | return a * f; | ||||
| } | } | ||||
| ccl_device_inline float4 operator/(const float4 &a, float f) | ccl_device_inline float4 operator/(const float4 &a, float f) | ||||
| { | { | ||||
| return a * (1.0f / f); | return a * (1.0f / f); | ||||
| } | } | ||||
| ccl_device_inline float4 operator/(const float4 &a, const float4 &b) | ccl_device_inline float4 operator/(const float4 &a, const float4 &b) | ||||
| { | { | ||||
| # ifdef __KERNEL_SSE__ | #ifdef __KERNEL_SSE__ | ||||
| return float4(_mm_div_ps(a.m128, b.m128)); | return float4(_mm_div_ps(a.m128, b.m128)); | ||||
| # else | #else | ||||
| return make_float4(a.x / b.x, a.y / b.y, a.z / b.z, a.w / b.w); | return make_float4(a.x / b.x, a.y / b.y, a.z / b.z, a.w / b.w); | ||||
| # endif | #endif | ||||
| } | } | ||||
| ccl_device_inline float4 operator+(const float4 &a, const float f) | ccl_device_inline float4 operator+(const float4 &a, const float f) | ||||
| { | { | ||||
| return a + make_float4(f, f, f, f); | return a + make_float4(f, f, f, f); | ||||
| } | } | ||||
| ccl_device_inline float4 operator+(const float4 &a, const float4 &b) | ccl_device_inline float4 operator+(const float4 &a, const float4 &b) | ||||
| { | { | ||||
| # ifdef __KERNEL_SSE__ | #ifdef __KERNEL_SSE__ | ||||
| return float4(_mm_add_ps(a.m128, b.m128)); | return float4(_mm_add_ps(a.m128, b.m128)); | ||||
| # else | #else | ||||
| return make_float4(a.x + b.x, a.y + b.y, a.z + b.z, a.w + b.w); | return make_float4(a.x + b.x, a.y + b.y, a.z + b.z, a.w + b.w); | ||||
| # endif | #endif | ||||
| } | } | ||||
| ccl_device_inline float4 operator-(const float4 &a, const float f) | ccl_device_inline float4 operator-(const float4 &a, const float f) | ||||
| { | { | ||||
| return a - make_float4(f, f, f, f); | return a - make_float4(f, f, f, f); | ||||
| } | } | ||||
| ccl_device_inline float4 operator-(const float4 &a, const float4 &b) | ccl_device_inline float4 operator-(const float4 &a, const float4 &b) | ||||
| { | { | ||||
| # ifdef __KERNEL_SSE__ | #ifdef __KERNEL_SSE__ | ||||
| return float4(_mm_sub_ps(a.m128, b.m128)); | return float4(_mm_sub_ps(a.m128, b.m128)); | ||||
| # else | #else | ||||
| return make_float4(a.x - b.x, a.y - b.y, a.z - b.z, a.w - b.w); | return make_float4(a.x - b.x, a.y - b.y, a.z - b.z, a.w - b.w); | ||||
| # endif | #endif | ||||
| } | } | ||||
| ccl_device_inline float4 operator+=(float4 &a, const float4 &b) | ccl_device_inline float4 operator+=(float4 &a, const float4 &b) | ||||
| { | { | ||||
| return a = a + b; | return a = a + b; | ||||
| } | } | ||||
| ccl_device_inline float4 operator-=(float4 &a, const float4 &b) | ccl_device_inline float4 operator-=(float4 &a, const float4 &b) | ||||
| Show All 13 Lines | |||||
| ccl_device_inline float4 operator/=(float4 &a, float f) | ccl_device_inline float4 operator/=(float4 &a, float f) | ||||
| { | { | ||||
| return a = a / f; | return a = a / f; | ||||
| } | } | ||||
| ccl_device_inline int4 operator<(const float4 &a, const float4 &b) | ccl_device_inline int4 operator<(const float4 &a, const float4 &b) | ||||
| { | { | ||||
| # ifdef __KERNEL_SSE__ | #ifdef __KERNEL_SSE__ | ||||
| return int4(_mm_castps_si128(_mm_cmplt_ps(a.m128, b.m128))); | return int4(_mm_castps_si128(_mm_cmplt_ps(a.m128, b.m128))); | ||||
| # else | #else | ||||
| return make_int4(a.x < b.x, a.y < b.y, a.z < b.z, a.w < b.w); | return make_int4(a.x < b.x, a.y < b.y, a.z < b.z, a.w < b.w); | ||||
| # endif | #endif | ||||
| } | } | ||||
| ccl_device_inline int4 operator>=(const float4 &a, const float4 &b) | ccl_device_inline int4 operator>=(const float4 &a, const float4 &b) | ||||
| { | { | ||||
| # ifdef __KERNEL_SSE__ | #ifdef __KERNEL_SSE__ | ||||
| return int4(_mm_castps_si128(_mm_cmpge_ps(a.m128, b.m128))); | return int4(_mm_castps_si128(_mm_cmpge_ps(a.m128, b.m128))); | ||||
| # else | #else | ||||
| return make_int4(a.x >= b.x, a.y >= b.y, a.z >= b.z, a.w >= b.w); | return make_int4(a.x >= b.x, a.y >= b.y, a.z >= b.z, a.w >= b.w); | ||||
| # endif | #endif | ||||
| } | } | ||||
| ccl_device_inline int4 operator<=(const float4 &a, const float4 &b) | ccl_device_inline int4 operator<=(const float4 &a, const float4 &b) | ||||
| { | { | ||||
| # ifdef __KERNEL_SSE__ | #ifdef __KERNEL_SSE__ | ||||
| return int4(_mm_castps_si128(_mm_cmple_ps(a.m128, b.m128))); | return int4(_mm_castps_si128(_mm_cmple_ps(a.m128, b.m128))); | ||||
| # else | #else | ||||
| return make_int4(a.x <= b.x, a.y <= b.y, a.z <= b.z, a.w <= b.w); | return make_int4(a.x <= b.x, a.y <= b.y, a.z <= b.z, a.w <= b.w); | ||||
| # endif | #endif | ||||
| } | } | ||||
| ccl_device_inline bool operator==(const float4 &a, const float4 &b) | ccl_device_inline bool operator==(const float4 &a, const float4 &b) | ||||
| { | { | ||||
| # ifdef __KERNEL_SSE__ | #ifdef __KERNEL_SSE__ | ||||
| return (_mm_movemask_ps(_mm_cmpeq_ps(a.m128, b.m128)) & 15) == 15; | return (_mm_movemask_ps(_mm_cmpeq_ps(a.m128, b.m128)) & 15) == 15; | ||||
| # else | #else | ||||
| return (a.x == b.x && a.y == b.y && a.z == b.z && a.w == b.w); | return (a.x == b.x && a.y == b.y && a.z == b.z && a.w == b.w); | ||||
| # endif | #endif | ||||
| } | } | ||||
| ccl_device_inline float distance(const float4 &a, const float4 &b) | ccl_device_inline float distance(const float4 &a, const float4 &b) | ||||
| { | { | ||||
| return len(a - b); | return len(a - b); | ||||
| } | } | ||||
| ccl_device_inline float dot(const float4 &a, const float4 &b) | ccl_device_inline float dot(const float4 &a, const float4 &b) | ||||
| { | { | ||||
| # if defined(__KERNEL_SSE41__) && defined(__KERNEL_SSE__) | #if defined(__KERNEL_SSE41__) && defined(__KERNEL_SSE__) | ||||
| # if defined(__KERNEL_NEON__) | # if defined(__KERNEL_NEON__) | ||||
| __m128 t = vmulq_f32(a, b); | __m128 t = vmulq_f32(a, b); | ||||
| return vaddvq_f32(t); | return vaddvq_f32(t); | ||||
| # else | # else | ||||
| return _mm_cvtss_f32(_mm_dp_ps(a, b, 0xFF)); | return _mm_cvtss_f32(_mm_dp_ps(a, b, 0xFF)); | ||||
| # endif | # endif | ||||
| # else | #else | ||||
| return (a.x * b.x + a.y * b.y) + (a.z * b.z + a.w * b.w); | return (a.x * b.x + a.y * b.y) + (a.z * b.z + a.w * b.w); | ||||
| # endif | #endif | ||||
| } | } | ||||
| ccl_device_inline float len_squared(const float4 &a) | ccl_device_inline float len_squared(const float4 &a) | ||||
| { | { | ||||
| return dot(a, a); | return dot(a, a); | ||||
| } | } | ||||
| ccl_device_inline float4 rcp(const float4 &a) | ccl_device_inline float4 rcp(const float4 &a) | ||||
| { | { | ||||
| # ifdef __KERNEL_SSE__ | #ifdef __KERNEL_SSE__ | ||||
| /* Don't use _mm_rcp_ps due to poor precision. */ | /* Don't use _mm_rcp_ps due to poor precision. */ | ||||
| return float4(_mm_div_ps(_mm_set_ps1(1.0f), a.m128)); | return float4(_mm_div_ps(_mm_set_ps1(1.0f), a.m128)); | ||||
| # else | #else | ||||
| return make_float4(1.0f / a.x, 1.0f / a.y, 1.0f / a.z, 1.0f / a.w); | return make_float4(1.0f / a.x, 1.0f / a.y, 1.0f / a.z, 1.0f / a.w); | ||||
| # endif | #endif | ||||
| } | } | ||||
| ccl_device_inline float4 sqrt(const float4 &a) | ccl_device_inline float4 sqrt(const float4 &a) | ||||
| { | { | ||||
| # ifdef __KERNEL_SSE__ | #ifdef __KERNEL_SSE__ | ||||
| return float4(_mm_sqrt_ps(a.m128)); | return float4(_mm_sqrt_ps(a.m128)); | ||||
| # else | #else | ||||
| return make_float4(sqrtf(a.x), sqrtf(a.y), sqrtf(a.z), sqrtf(a.w)); | return make_float4(sqrtf(a.x), sqrtf(a.y), sqrtf(a.z), sqrtf(a.w)); | ||||
| # endif | #endif | ||||
| } | } | ||||
| ccl_device_inline float4 sqr(const float4 &a) | ccl_device_inline float4 sqr(const float4 &a) | ||||
| { | { | ||||
| return a * a; | return a * a; | ||||
| } | } | ||||
| ccl_device_inline float4 cross(const float4 &a, const float4 &b) | ccl_device_inline float4 cross(const float4 &a, const float4 &b) | ||||
| { | { | ||||
| # ifdef __KERNEL_SSE__ | #ifdef __KERNEL_SSE__ | ||||
| return (shuffle<1, 2, 0, 0>(a) * shuffle<2, 0, 1, 0>(b)) - | return (shuffle<1, 2, 0, 0>(a) * shuffle<2, 0, 1, 0>(b)) - | ||||
| (shuffle<2, 0, 1, 0>(a) * shuffle<1, 2, 0, 0>(b)); | (shuffle<2, 0, 1, 0>(a) * shuffle<1, 2, 0, 0>(b)); | ||||
| # else | #else | ||||
| return make_float4(a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z, a.x * b.y - a.y * b.x, 0.0f); | return make_float4(a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z, a.x * b.y - a.y * b.x, 0.0f); | ||||
| # endif | #endif | ||||
| } | } | ||||
| ccl_device_inline bool is_zero(const float4 &a) | ccl_device_inline bool is_zero(const float4 &a) | ||||
| { | { | ||||
| # ifdef __KERNEL_SSE__ | #ifdef __KERNEL_SSE__ | ||||
| return a == make_float4(0.0f); | return a == make_float4(0.0f); | ||||
| # else | #else | ||||
| return (a.x == 0.0f && a.y == 0.0f && a.z == 0.0f && a.w == 0.0f); | return (a.x == 0.0f && a.y == 0.0f && a.z == 0.0f && a.w == 0.0f); | ||||
| # endif | #endif | ||||
| } | } | ||||
| ccl_device_inline float4 reduce_add(const float4 &a) | ccl_device_inline float4 reduce_add(const float4 &a) | ||||
| { | { | ||||
| # if defined(__KERNEL_SSE__) | #if defined(__KERNEL_SSE__) | ||||
| # if defined(__KERNEL_NEON__) | # if defined(__KERNEL_NEON__) | ||||
| return float4(vdupq_n_f32(vaddvq_f32(a))); | return float4(vdupq_n_f32(vaddvq_f32(a))); | ||||
| # elif defined(__KERNEL_SSE3__) | # elif defined(__KERNEL_SSE3__) | ||||
| float4 h(_mm_hadd_ps(a.m128, a.m128)); | float4 h(_mm_hadd_ps(a.m128, a.m128)); | ||||
| return float4(_mm_hadd_ps(h.m128, h.m128)); | return float4(_mm_hadd_ps(h.m128, h.m128)); | ||||
| # else | # else | ||||
| float4 h(shuffle<1, 0, 3, 2>(a) + a); | float4 h(shuffle<1, 0, 3, 2>(a) + a); | ||||
| return shuffle<2, 3, 0, 1>(h) + h; | return shuffle<2, 3, 0, 1>(h) + h; | ||||
| # endif | # endif | ||||
| # else | #else | ||||
| float sum = (a.x + a.y) + (a.z + a.w); | float sum = (a.x + a.y) + (a.z + a.w); | ||||
| return make_float4(sum, sum, sum, sum); | return make_float4(sum, sum, sum, sum); | ||||
| # endif | #endif | ||||
| } | } | ||||
| ccl_device_inline float average(const float4 &a) | ccl_device_inline float average(const float4 &a) | ||||
| { | { | ||||
| return reduce_add(a).x * 0.25f; | return reduce_add(a).x * 0.25f; | ||||
| } | } | ||||
| ccl_device_inline float len(const float4 &a) | ccl_device_inline float len(const float4 &a) | ||||
| Show All 9 Lines | |||||
| ccl_device_inline float4 safe_normalize(const float4 &a) | ccl_device_inline float4 safe_normalize(const float4 &a) | ||||
| { | { | ||||
| float t = len(a); | float t = len(a); | ||||
| return (t != 0.0f) ? a / t : a; | return (t != 0.0f) ? a / t : a; | ||||
| } | } | ||||
| ccl_device_inline float4 min(const float4 &a, const float4 &b) | ccl_device_inline float4 min(const float4 &a, const float4 &b) | ||||
| { | { | ||||
| # ifdef __KERNEL_SSE__ | #ifdef __KERNEL_SSE__ | ||||
| return float4(_mm_min_ps(a.m128, b.m128)); | return float4(_mm_min_ps(a.m128, b.m128)); | ||||
| # else | #else | ||||
| return make_float4(min(a.x, b.x), min(a.y, b.y), min(a.z, b.z), min(a.w, b.w)); | return make_float4(min(a.x, b.x), min(a.y, b.y), min(a.z, b.z), min(a.w, b.w)); | ||||
| # endif | #endif | ||||
| } | } | ||||
| ccl_device_inline float4 max(const float4 &a, const float4 &b) | ccl_device_inline float4 max(const float4 &a, const float4 &b) | ||||
| { | { | ||||
| # ifdef __KERNEL_SSE__ | #ifdef __KERNEL_SSE__ | ||||
| return float4(_mm_max_ps(a.m128, b.m128)); | return float4(_mm_max_ps(a.m128, b.m128)); | ||||
| # else | #else | ||||
| return make_float4(max(a.x, b.x), max(a.y, b.y), max(a.z, b.z), max(a.w, b.w)); | return make_float4(max(a.x, b.x), max(a.y, b.y), max(a.z, b.z), max(a.w, b.w)); | ||||
| # endif | #endif | ||||
| } | } | ||||
| ccl_device_inline float4 clamp(const float4 &a, const float4 &mn, const float4 &mx) | ccl_device_inline float4 clamp(const float4 &a, const float4 &mn, const float4 &mx) | ||||
| { | { | ||||
| return min(max(a, mn), mx); | return min(max(a, mn), mx); | ||||
| } | } | ||||
| ccl_device_inline float4 fabs(const float4 &a) | ccl_device_inline float4 fabs(const float4 &a) | ||||
| { | { | ||||
| # if defined(__KERNEL_SSE__) | #if defined(__KERNEL_SSE__) | ||||
| # if defined(__KERNEL_NEON__) | # if defined(__KERNEL_NEON__) | ||||
| return float4(vabsq_f32(a)); | return float4(vabsq_f32(a)); | ||||
| # else | # else | ||||
| return float4(_mm_and_ps(a.m128, _mm_castsi128_ps(_mm_set1_epi32(0x7fffffff)))); | return float4(_mm_and_ps(a.m128, _mm_castsi128_ps(_mm_set1_epi32(0x7fffffff)))); | ||||
| # endif | # endif | ||||
| # else | #else | ||||
| return make_float4(fabsf(a.x), fabsf(a.y), fabsf(a.z), fabsf(a.w)); | return make_float4(fabsf(a.x), fabsf(a.y), fabsf(a.z), fabsf(a.w)); | ||||
| # endif | #endif | ||||
| } | } | ||||
| ccl_device_inline float4 floor(const float4 &a) | ccl_device_inline float4 floor(const float4 &a) | ||||
| { | { | ||||
| # ifdef __KERNEL_SSE__ | #ifdef __KERNEL_SSE__ | ||||
| return float4(_mm_floor_ps(a)); | return float4(_mm_floor_ps(a)); | ||||
| # else | #else | ||||
| return make_float4(floorf(a.x), floorf(a.y), floorf(a.z), floorf(a.w)); | return make_float4(floorf(a.x), floorf(a.y), floorf(a.z), floorf(a.w)); | ||||
| # endif | #endif | ||||
| } | } | ||||
| ccl_device_inline float4 mix(const float4 &a, const float4 &b, float t) | ccl_device_inline float4 mix(const float4 &a, const float4 &b, float t) | ||||
| { | { | ||||
| return a + t * (b - a); | return a + t * (b - a); | ||||
| } | } | ||||
| #endif /* !__KERNEL_OPENCL__*/ | |||||
| #ifdef __KERNEL_SSE__ | #ifdef __KERNEL_SSE__ | ||||
| template<size_t index_0, size_t index_1, size_t index_2, size_t index_3> | template<size_t index_0, size_t index_1, size_t index_2, size_t index_3> | ||||
| __forceinline const float4 shuffle(const float4 &b) | __forceinline const float4 shuffle(const float4 &b) | ||||
| { | { | ||||
| # if defined(__KERNEL_NEON__) | # if defined(__KERNEL_NEON__) | ||||
| return float4(shuffle_neon<__m128, index_0, index_1, index_2, index_3>(b.m128)); | return float4(shuffle_neon<__m128, index_0, index_1, index_2, index_3>(b.m128)); | ||||
| # else | # else | ||||
| return float4(_mm_castsi128_ps( | return float4(_mm_castsi128_ps( | ||||
| ▲ Show 20 Lines • Show All 124 Lines • Show Last 20 Lines | |||||