FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
NetVec3f.h
1// The 3D float vector of the test structures (NetStructureTest, NetCableElementTest, NetTwineElement, ...).
2//
3// It is fhlib's SSE vector on every architecture: SSE on x86_64, and on arm64 fhlib's SSEVec3.h maps the
4// intrinsics to NEON through sse2neon. NetVec3fLanes gives the four float lanes (MSVC has the member
5// m128_f32, GCC and Clang do not, so the union is not used).
6#pragma once
7
8#include <sfh/linalg/SSEVec3.h> // __m128: SSE on x86_64, sse2neon on arm64
9
10using NetVec3f = sfh::linalg::SSEVec3;
11
12inline float * NetVec3fLanes(NetVec3f & value)
13{
14 return reinterpret_cast<float *>(&value.mmvalue);
15}
16
17inline const float * NetVec3fLanes(const NetVec3f & value)
18{
19 return reinterpret_cast<const float *>(&value.mmvalue);
20}