MCPcopy Create free account
hub / github.com/EricLengyel/Terathon-Math-Library / VecHorizontalSum3D

Function VecHorizontalSum3D

TSSimd.h:1744–1763  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1742 }
1743
1744 inline vec_float VecHorizontalSum3D(const vec_float& v)
1745 {
1746 #if defined(TERATHON_SSE)
1747
1748 #if defined(TERATHON_SSE4)
1749
1750 return (_mm_add_ss(_mm_hadd_ps(v, v), _mm_insert_ps(v, v, 0x8E)));
1751
1752 #else
1753
1754 return (_mm_add_ss(_mm_add_ss(v, VecSmearY(v)), VecSmearZ(v)));
1755
1756 #endif
1757
1758 #elif defined(TERATHON_NEON)
1759
1760 return (vaddq_f32(vpaddq_f32(v, v), vdupq_n_f32(vgetq_lane_f32(v, 2))));
1761
1762 #endif
1763 }
1764
1765 inline vec_float VecDot3D(const vec_float& v1, const vec_float& v2)
1766 {

Callers

nothing calls this directly

Calls 2

VecSmearYFunction · 0.85
VecSmearZFunction · 0.85

Tested by

no test coverage detected