#include <KoStreamedMath.h>
|
| using | float_v = xsimd::batch<float, _impl> |
| |
template<typename _impl>
struct OptiDiv< _impl >
Definition at line 118 of file KoStreamedMath.h.
◆ float_v
template<typename _impl >
| using OptiDiv< _impl >::float_v = xsimd::batch<float, _impl> |
◆ divScalar()
template<typename _impl >
| static ALWAYS_INLINE float OptiDiv< _impl >::divScalar |
( |
const float & | divident, |
|
|
const float & | divisor ) |
|
inlinestatic |
Definition at line 121 of file KoStreamedMath.h.
122 {
123#ifdef __SSE__
124 float result = NAN;
125
126 __m128
x = _mm_set_ss(divisor);
127 __m128
y = _mm_set_ss(divident);
129 x = _mm_mul_ss(x, y);
130
131 _mm_store_ss(&result, x);
132 return result;
133#elif defined __ARM_NEON
134 auto x = vdupq_n_f32(divisor);
135 auto y = vdupq_n_f32(divident);
138
139 return vgetq_lane_f32(x, 0);
140#else
141 return (1.f / divisor) * divident;
142#endif
143 }
◆ divVector()
template<typename _impl >
Definition at line 145 of file KoStreamedMath.h.
146 {
147 return divident * xsimd::reciprocal(divisor);
148 }
The documentation for this struct was generated from the following file: