0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-30 04:38:52 +02:00

ircd::simd: Fix static emission of traits and related templates.

This commit is contained in:
Jason Volk 2020-08-22 20:44:55 -07:00
parent 669c8d0d0f
commit 146a08dabd
2 changed files with 6 additions and 2 deletions

View file

@ -40,6 +40,7 @@ noexcept
/// Convenience template. Extends a bool value where the lsb is 1 or 0 into a /// Convenience template. Extends a bool value where the lsb is 1 or 0 into a
/// mask value like the result of vector comparisons. /// mask value like the result of vector comparisons.
template<class T> template<class T>
[[gnu::always_inline]]
inline T inline T
ircd::simd::boolmask(const T a) ircd::simd::boolmask(const T a)
noexcept noexcept
@ -51,6 +52,7 @@ noexcept
/// sometimes one might need an actual value of 1 for accumulators or maybe /// sometimes one might need an actual value of 1 for accumulators or maybe
/// some bool-type reason... /// some bool-type reason...
template<class T> template<class T>
[[gnu::always_inline]]
inline T inline T
ircd::simd::popmask(const T a) ircd::simd::popmask(const T a)
noexcept noexcept

View file

@ -40,7 +40,8 @@ namespace ircd::simd
/// Get number of lanes for vector type (the number after the x in the /// Get number of lanes for vector type (the number after the x in the
/// type name). /// type name).
template<class T> template<class T>
constexpr size_t [[gnu::always_inline]]
inline constexpr size_t
ircd::simd::lanes() ircd::simd::lanes()
{ {
constexpr size_t ret constexpr size_t ret
@ -58,7 +59,8 @@ ircd::simd::lanes()
/// Get the size of each lane; i.e the size of one integral element. /// Get the size of each lane; i.e the size of one integral element.
template<class T> template<class T>
constexpr size_t [[gnu::always_inline]]
inline constexpr size_t
ircd::simd::sizeof_lane() ircd::simd::sizeof_lane()
{ {
constexpr size_t ret constexpr size_t ret