#include <KoStreamedMath.h>
|
| using | float_v = xsimd::batch<float, _impl> |
| |
template<typename _impl>
struct OptiDiv< _impl >
Definition at line 120 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 123 of file KoStreamedMath.h.
124 {
125#ifdef __SSE__
126 float result = NAN;
127
128 __m128
x = _mm_set_ss(divisor);
129 __m128
y = _mm_set_ss(divident);
131 x = _mm_mul_ss(x, y);
132
133 _mm_store_ss(&result, x);
134 return result;
135#elif defined __ARM_NEON
136 auto x = vdupq_n_f32(divisor);
137 auto y = vdupq_n_f32(divident);
140
141 return vgetq_lane_f32(x, 0);
142#else
143 return (1.f / divisor) * divident;
144#endif
145 }
◆ divVector()
template<typename _impl >
Definition at line 147 of file KoStreamedMath.h.
148 {
149 return divident * xsimd::reciprocal(divisor);
150 }
The documentation for this struct was generated from the following file: