MCPcopy Create free account
hub / github.com/davisking/dlib / operator/

Function operator/

dlib/simd/simd4f.h:373–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371// ----------------------------------------------------------------------------------------
372
373 inline simd4f operator/ (const simd4f& lhs, const simd4f& rhs)
374 {
375#ifdef DLIB_HAVE_SSE2
376 return _mm_div_ps(lhs, rhs);
377#elif defined(DLIB_HAVE_VSX)
378 return vec_div(lhs(), rhs());
379#elif defined(DLIB_HAVE_NEON)
380 float32x4_t reciprocal = vrecpeq_f32(rhs);
381 reciprocal = vmulq_f32(vrecpsq_f32(rhs, reciprocal), reciprocal);
382 reciprocal = vmulq_f32(vrecpsq_f32(rhs, reciprocal), reciprocal);
383 float32x4_t result = vmulq_f32(lhs,reciprocal);
384 return result;
385#else
386 return simd4f(lhs[0]/rhs[0],
387 lhs[1]/rhs[1],
388 lhs[2]/rhs[2],
389 lhs[3]/rhs[3]);
390#endif
391 }
392 inline simd4f& operator/= (simd4f& lhs, const simd4f& rhs)
393 { lhs = lhs / rhs; return lhs; }
394

Callers

nothing calls this directly

Calls 1

simd4fClass · 0.70

Tested by

no test coverage detected