mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-20 04:40:54 +00:00
linux required changes
This commit is contained in:
parent
d8b511bbf9
commit
fa7a8df3aa
3 changed files with 14 additions and 3 deletions
|
|
@ -28,8 +28,16 @@ namespace
|
|||
// Element-wise multiply
|
||||
inline f32x4 v_mul(f32x4 a, f32x4 b) { return _mm_mul_ps(a, b); }
|
||||
|
||||
// Element-wise divide fast (1/b)
|
||||
inline f32x4 v_div_fast(f32x4 a, f32x4 b)
|
||||
{
|
||||
f32x4 rcp = _mm_rcp_ps(b);
|
||||
// Optional refinement here
|
||||
return _mm_mul_ps(a, rcp);
|
||||
}
|
||||
|
||||
// Element-wise divide
|
||||
inline f32x4 v_div(f32x4 a, f32x4 b) { return _mm_div_ps(a, b); }
|
||||
inline f32x4 v_div(f32x4 a, f32x4 b) { return v_div_fast(a, b); }
|
||||
|
||||
// Element-wise add
|
||||
inline f32x4 v_add(f32x4 a, f32x4 b) { return _mm_add_ps(a, b); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue