SuperDex Physics C++ API
Loading...
Searching...
No Matches
simd_composite_inl.h File Reference
#include "../simd.h"
#include <type_traits>
#include <utility>

Go to the source code of this file.

Classes

class  superdex::Simd< T, N, std::enable_if_t<(N > kSimdDefaultSize< T > &&Simd< T >::kIsSupported), SimdConcept > >
 Simd partial specialization for larger values of N. More...

Namespaces

namespace  superdex

Macros

#define MOCHI_SIMD_COMPOSITE_FN_1(FnName)
#define MOCHI_SIMD_COMPOSITE_FN_2(FnName)
#define MOCHI_SIMD_COMPOSITE_FN_3(FnName)
#define MOCHI_SIMD_COMPOSITE_OP_1(OP)
#define MOCHI_SIMD_COMPOSITE_OP_2(OP)
#define MOCHI_SIMD_COMPOSITE_OP_EQ(OP_EQ, OP)
#define MOCHI_SIMD_COMPOSITE_OP_EQ_WITH_SCALAR(OP_EQ, OP)

Functions

template<class To, class From, std::enable_if_t< IsSimd< To > &&IsSimd< From >, superdex::ConceptMatch >>
To superdex::StaticCast (From const &a)

Macro Definition Documentation

◆ MOCHI_SIMD_COMPOSITE_FN_1

#define MOCHI_SIMD_COMPOSITE_FN_1 ( FnName)
Value:
[[nodiscard]] static MOCHI_ANY MOCHI_FORCE_INLINE Simd FnName(Simd a) { \
return {First::FnName(a.first), Second::FnName(a.second)}; \
}
#define MOCHI_FORCE_INLINE
#define MOCHI_ANY

Definition at line 570 of file simd_composite_inl.h.

◆ MOCHI_SIMD_COMPOSITE_FN_2

#define MOCHI_SIMD_COMPOSITE_FN_2 ( FnName)
Value:
[[nodiscard]] static MOCHI_ANY MOCHI_FORCE_INLINE Simd FnName(Simd a, Simd b) { \
return {First::FnName(a.first, b.first), Second::FnName(a.second, b.second)}; \
}

Definition at line 575 of file simd_composite_inl.h.

◆ MOCHI_SIMD_COMPOSITE_FN_3

#define MOCHI_SIMD_COMPOSITE_FN_3 ( FnName)
Value:
[[nodiscard]] static MOCHI_ANY MOCHI_FORCE_INLINE Simd FnName(Simd a, Simd b, Simd c) { \
return { \
First::FnName(a.first, b.first, c.first), Second::FnName(a.second, b.second, c.second)}; \
}

Definition at line 580 of file simd_composite_inl.h.

◆ MOCHI_SIMD_COMPOSITE_OP_1

#define MOCHI_SIMD_COMPOSITE_OP_1 ( OP)
Value:
[[nodiscard]] MOCHI_ANY MOCHI_FORCE_INLINE Simd operator OP() const { \
return {OP this->first, OP this->second}; \
}

Definition at line 586 of file simd_composite_inl.h.

◆ MOCHI_SIMD_COMPOSITE_OP_2

#define MOCHI_SIMD_COMPOSITE_OP_2 ( OP)
Value:
[[nodiscard]] MOCHI_ANY MOCHI_FORCE_INLINE Simd operator OP(Simd rhs) const { \
return {this->first OP rhs.first, this->second OP rhs.second}; \
}

Definition at line 591 of file simd_composite_inl.h.

◆ MOCHI_SIMD_COMPOSITE_OP_EQ

#define MOCHI_SIMD_COMPOSITE_OP_EQ ( OP_EQ,
OP )
Value:
MOCHI_ANY MOCHI_FORCE_INLINE Simd& operator OP_EQ(Simd a) { \
this->first = this->first OP a.first; \
this->second = this->second OP a.second; \
return *this; \
}

Definition at line 596 of file simd_composite_inl.h.

◆ MOCHI_SIMD_COMPOSITE_OP_EQ_WITH_SCALAR

#define MOCHI_SIMD_COMPOSITE_OP_EQ_WITH_SCALAR ( OP_EQ,
OP )
Value:
MOCHI_ANY MOCHI_FORCE_INLINE Simd& operator OP_EQ(Scalar a) { \
this->first = this->first OP First{a}; \
this->second = this->second OP Second{a}; \
return *this; \
}
#define MOCHI_SIMD_COMPOSITE_OP_EQ(OP_EQ, OP)

Definition at line 603 of file simd_composite_inl.h.