mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 10:14:35 +00:00
simd constexpr vec: small change and fix
This commit is contained in:
parent
4620fae1d1
commit
b21be860bf
@ -18,7 +18,7 @@
|
||||
using G = typename vec<L, T, Q>::GccVec_t; \
|
||||
G vin; std::memcpy(&vin, &data, std::min(sizeof(data), sizeof(vin))); \
|
||||
GccVec<4, T, Q> vout; \
|
||||
vout = __builtin_shufflevector(vin, vin, offsetof(E, A)/sizeof(A), offsetof(E, B)/sizeof(B), offsetof(E, C)/sizeof(C), offsetof(E, A)/sizeof(A)+1); \
|
||||
vout = __builtin_shufflevector(vin, vin, offsetof(E, A)/sizeof(A), offsetof(E, B)/sizeof(B), offsetof(E, C)/sizeof(C), offsetof(E, A)/sizeof(A)); \
|
||||
vec<3, T, Q> voutfin; std::memcpy(&voutfin, &vout, sizeof(voutfin)); \
|
||||
return voutfin; \
|
||||
}
|
||||
|
@ -772,9 +772,6 @@ namespace glm
|
||||
template <length_t Lx>
|
||||
friend inline GLM_CONSTEXPR vec<L, T, Q> operator/(vec<Lx, T, Q> v1, vec<L, T, Q> && __restrict__ v2) requires (!NotVec1<Lx> && NotVec1<L>)
|
||||
{
|
||||
if constexpr (L == 3 && !BIsAlignedQ<Q>())
|
||||
return *(new (&v2) vec<L, T, Q>( v1.data / v2.x, v1.data/v2.y, v1.data/v2.z ));
|
||||
else
|
||||
return vec<L, T, Q>(v1.x) /= v2;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user