| 1896 | } |
| 1897 | |
| 1898 | inline vec_float VecTransformVector3D(const vec_float& c1, const vec_float& c2, const vec_float& c3, const vec_float& v) |
| 1899 | { |
| 1900 | #if defined(TERATHON_SSE) |
| 1901 | |
| 1902 | vec_float result = _mm_mul_ps(c1, VecSmearX(v)); |
| 1903 | result = _mm_add_ps(result, _mm_mul_ps(c2, VecSmearY(v))); |
| 1904 | return (_mm_add_ps(result, _mm_mul_ps(c3, VecSmearZ(v)))); |
| 1905 | |
| 1906 | #elif defined(TERATHON_NEON) |
| 1907 | |
| 1908 | vec_float result = vmulq_f32(c1, VecSmearX(v)); |
| 1909 | result = vfmaq_f32(result, c2, VecSmearY(v)); |
| 1910 | return (vfmaq_f32(result, c3, VecSmearZ(v))); |
| 1911 | |
| 1912 | #endif |
| 1913 | } |
| 1914 | |
| 1915 | inline vec_float VecTransformPoint3D(const vec_float& c1, const vec_float& c2, const vec_float& c3, const vec_float& c4, const vec_float& p) |
| 1916 | { |
no test coverage detected