Skip to content

Commit

Permalink
adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkautarch committed Dec 14, 2024
1 parent b463cf9 commit 09a78a2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions glm/detail/simd_constexpr/vec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ namespace glm
for (length_t i = 0; i < L; i++) {
a.p[i]=scalar();
}
return EC{.data=std::bit_cast<data_t>(a)};
return EC{.elementArr=std::bit_cast<data_t>(a)};
} else {
return EC{.data=SimdHlp::simd_ctor_scalar(scalar())};
}
Expand All @@ -239,7 +239,7 @@ namespace glm
a.p[i] = (T)ax.p[i];
}

return EC{.data=std::bit_cast<data_t>(a)};
return EC{.elementArr=std::bit_cast<data_t>(a)};
} else {
return EC{.data=SimdHlp::simd_ctor(vecGetter())};
}
Expand Down Expand Up @@ -291,13 +291,13 @@ namespace glm
template <arithmetic... Scalar> requires (sizeof...(Scalar) == L)
constexpr __attribute__((always_inline)) vec(Scalar... scalar)
: EC
{.elementArr= [scalar...]() -> DataArray
{ [scalar...]() -> EC
{
if (std::is_constant_evaluated() || (L == 3 && !BIsAlignedQ<Q>())) {
DataArray a = {.p={ static_cast<T>(scalar)... }};
return a;
return EC{.elementArr=a};
} else {
return std::bit_cast<DataArray>(SimdHlp::simd_ctor_multi_scalars(scalar...));
return EC{.data=SimdHlp::simd_ctor_multi_scalars(scalar...))};
}
}()
} {}
Expand Down

0 comments on commit 09a78a2

Please sign in to comment.