SuperDex Physics C++ API
Loading...
Searching...
No Matches
simd.h File Reference
#include <mochi_core/mochi_config.h>
#include <mochi_core/mochi_platform.h>
#include <mochi_core/utils/basic_utils.h>
#include <mochi_core/utils/reflection.h>
#include <type_traits>
#include <utility>
#include "simd/simd_specializations_inl.h"
#include "simd/simd_inl.h"

Go to the source code of this file.

Classes

struct  superdex::Simd< T, N, Concept >::NotSupported
class  superdex::Simd< T, N, Concept >
struct  superdex::SimdConcept

Namespaces

namespace  superdex

Concepts

concept  superdex::IsHalf
concept  superdex::IsSimd
concept  superdex::IsSimdSupportedType

Typedefs

using superdex::Vec2d = Simd<double, 2>
using superdex::Vec2l = Simd<int64_t, 2>
using superdex::Vec4d = Simd<double, 4>
using superdex::Vec4f = Simd<float, 4>
using superdex::Vec4i = Simd<int, 4>
using superdex::Vec4l = Simd<int64_t, 4>
using superdex::Vec4r = Simd<real, 4>
using superdex::Vec8d = Simd<double, 8>
using superdex::Vec8f = Simd<float, 8>
using superdex::Vec8i = Simd<int, 8>
using superdex::Vec8l = Simd<int64_t, 8>
using superdex::Vec8r = Simd<real, 8>

Functions

template<class T, int N>
Simd< T, N > superdex::Abs (Simd< T, N > a)
template<class T, int N>
Simd< T, N > superdex::ACos (Simd< T, N > a)
template<int COUNT = -1, class T, int N>
bool superdex::AllTrue (Simd< T, N > a)
template<int COUNT = -1, class T, int N>
bool superdex::AnyTrue (Simd< T, N > a)
template<class T, int N>
Simd< T, N > superdex::ASin (Simd< T, N > a)
template<class T, int N>
Simd< T, N > superdex::ATan (Simd< T, N > a)
template<int x, int y, int z, int w, class T, int N>
Simd< T, N > superdex::Blend (Simd< T, N > a, Simd< T, N > b)
template<int x, int y, class T, int N>
Simd< T, N > superdex::Blend (Simd< T, N > a, Simd< T, N > b)
template<int i, class T, int N>
Simd< T, N > superdex::Broadcast (Simd< T, N > v)
template<class T, int N>
Simd< T, N > superdex::Broadcast (Simd< T, N > v, int i)
template<class V, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
superdex::Broadcast (typename V::Scalar a)
template<class V, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
superdex::Broadcast (typename V::Scalar const *ptr)
template<class T, int N>
Simd< T, N > superdex::Cos (Simd< T, N > a)
template<class T, int N>
Simd< T, N > superdex::Cross3 (Simd< T, N > a, Simd< T, N > b)
template<int COUNT = -1, class T, int N>
superdex::Dot (Simd< T, N > a, Simd< T, N > b)
template<int COUNT = -1, class T, int N>
bool superdex::Equal (Simd< T, N > a, Simd< T, N > b)
template<class T, int N>
Simd< T, N > superdex::Exp (Simd< T, N > a)
template<class T, int N>
Simd< T, N > superdex::FastRound (Simd< T, N > a)
template<class T, int N>
Simd< T, N > superdex::Floor (Simd< T, N > a)
template<int i, class T, int N>
superdex::Get (Simd< T, N > v)
template<class T, int N>
superdex::Get (Simd< T, N > v, int i)
template<class T, int N>
superdex::Get0 (Simd< T, N > v)
template<int iHalf, class T, int N>
Simd< T, N/2 > superdex::GetHalf (Simd< T, N > a)
template<int COUNT = -1, class T, int N>
superdex::HMax (Simd< T, N > a)
template<int COUNT = -1, class T, int N>
superdex::HMin (Simd< T, N > a)
template<int COUNT = -1, class T, int N>
superdex::HProd (Simd< T, N > a)
template<int COUNT = -1, class T, int N>
superdex::HSum (Simd< T, N > a)
template<class T, int N>
bool superdex::IsFinite (Simd< T, N > a)
template<int i, class T, int N>
int superdex::IsTrue (Simd< T, N > mask)
template<class T, int N>
Simd< T, N > superdex::Ln (Simd< T, N > a)
template<int N, class V, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
superdex::Load (typename V::Scalar const *ptr)
template<class V, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
superdex::Load (typename V::Scalar const *ptr)
template<class V, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
superdex::Load (typename V::Scalar const *ptr, int n)
template<class V, class I, std::enable_if_t< IsSimd< V >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
superdex::LoadIndexed (typename V::Scalar const *ptr, Simd< I, V::kSize > indices)
template<int kTupleCount = -1, class T, int N>
void superdex::LoadTransposed (T const *ptr, Simd< T, N > &out0, Simd< T, N > &out1, Simd< T, N > &out2)
template<class T, int N>
Simd< T, N > superdex::Max (Simd< T, N > a, Simd< T, N > b)
template<class T, int N>
Simd< T, N > superdex::Min (Simd< T, N > a, Simd< T, N > b)
template<class T, int N>
Simd< T, N > superdex::MulAdd (Simd< T, N > a, Simd< T, N > b, Simd< T, N > c)
template<class T, int N>
Simd< T, N > superdex::MulSub (Simd< T, N > a, Simd< T, N > b, Simd< T, N > c)
template<int COUNT = -1, class T, int N, class Eps = T>
bool superdex::NearEqual (Simd< T, N > a, Simd< T, N > b, Eps epsilon=kDefaultNearEqualEpsilon< Eps >)
template<int COUNT = -1, class T, int N, class Eps = T>
bool superdex::NearZero (Simd< T, N > a, Eps epsilon=kDefaultNearEqualEpsilon< Eps >)
template<bool x, bool y, bool z, bool w, class T, int N>
Simd< T, N > superdex::Neg (Simd< T, N > a)
template<class T, int N>
Simd< T, N > superdex::NegMulAdd (Simd< T, N > a, Simd< T, N > b, Simd< T, N > c)
template<class T, int N>
Simd< T, N > superdex::NegMulSub (Simd< T, N > a, Simd< T, N > b, Simd< T, N > c)
template<int COUNT = -1, class T, int N>
superdex::Norm (Simd< T, N > a)
template<int COUNT = -1, class T, int N>
Simd< T, N > superdex::Normalize (Simd< T, N > a)
template<class T, int N>
Simd< T, N > superdex::Normalize (Simd< T, N > a, Simd< T, N > normSqr)
template<class T, int N>
Simd< T, N > superdex::Normalize (Simd< T, N > a, T normSqr)
template<int COUNT = -1, class T, int N>
superdex::NormSqr (Simd< T, N > a)
template<int COUNT = -1, class T, int N>
bool superdex::NotEqual (Simd< T, N > a, Simd< T, N > b)
template<typename T, int N>
Simd< T, 4 > superdex::OrthogonalVector3 (Simd< T, 4 > a)
template<class T, int N>
Simd< T, N > superdex::RcpApprox (Simd< T, N > a)
template<class T, int N>
Simd< T, N > superdex::RcpSqrtApprox (Simd< T, N > a)
template<class T, int N, class MaskT>
Simd< T, N > superdex::Select (Simd< MaskT, N > conditionMask, Simd< T, N > a, Simd< T, N > b)
template<class V>
superdex::Sequence ()
template<class T, int N>
Simd< T, N > superdex::Set (Simd< T, N > a, int i, T value)
template<int i, class T, int N>
Simd< T, N > superdex::Set (Simd< T, N > a, T value)
template<int kShift, class T, int N>
Simd< T, N > superdex::ShiftRight (Simd< T, N > a)
template<int x = 0, int y = 1, class T>
Simd< T, 2 > superdex::Shuffle (Simd< T, 2 > a)
template<int x = 0, int y = 1, int z = 2, int w = 3, class T>
Simd< T, 4 > superdex::Shuffle (Simd< T, 4 > a)
template<int x, int y, int z, int w, class T>
Simd< T, 4 > superdex::Shuffle (Simd< T, 4 > a, Simd< T, 4 > b)
template<int i, class V = Vec4r>
superdex::SimdBasisVector ()
template<class V = Vec4r>
superdex::SimdBasisVector (int axis)
template<class V, class... MoreBools>
superdex::SimdMask (bool b0, bool b1, MoreBools... bs)
template<class V = Vec4r>
superdex::SimdZero ()
template<class T, int N>
Simd< T, N > superdex::Sin (Simd< T, N > a)
template<class T, int N>
std::pair< Simd< T, N >, Simd< T, N > > superdex::SinCos (Simd< T, N > a)
template<class T, int N>
Simd< T, N > superdex::Sqrt (Simd< T, N > a)
template<class VecTo, class VecFrom, std::enable_if_t< IsSimd< VecTo > &&IsSimd< VecFrom >, superdex::ConceptMatch > = superdex::ConceptMatch::True>
VecTo superdex::StaticCast (VecFrom const &a)
 StaticCast from one Simd type to another of the same size.
template<int COUNT = -1, class T, int N>
void superdex::Store (T *ptr, Simd< T, N > a)
template<class T, int N>
void superdex::Store (T *ptr, Simd< T, N > a, int count)
template<class T, int N, class MaskT>
int superdex::StoreSelected (T *ptr, Simd< MaskT, N > condition, Simd< T, N > values)
template<int kTupleCount = -1, class T, int N>
void superdex::StoreTransposed (T *ptr, Simd< T, N > a, Simd< T, N > b, Simd< T, N > c)
template<class T, int N>
Simd< T, N > superdex::Tan (Simd< T, N > a)
template<class T, int N>
Simd< T, N > superdex::Tanh (Simd< T, N > a)
template<class V>
superdex::ToSimdDirection (V a)
template<class V>
superdex::ToSimdPoint (V a)
template<int COUNT = -1, class V>
superdex::VDot (V a, V b)
template<class V>
superdex::VEqual (V a, V b)
template<class T, int N>
Simd< T, N > superdex::VIsFinite (Simd< T, N > a)
template<class V>
superdex::VNearEqual (V a, V b, V epsilon)
template<class V>
superdex::VNearZero (V a, V epsilon)
template<int COUNT = -1, class T, int N>
Simd< T, N > superdex::VNorm (Simd< T, N > a)
template<int COUNT = -1, class T, int N>
Simd< T, N > superdex::VNormSqr (Simd< T, N > a)
template<class V>
superdex::VNotEqual (V a, V b)

Variables

template<class T, int N>
Simd< T, N > const superdex::kDefaultNearEqualEpsilon< Simd< T, N > > {kDefaultNearEqualEpsilon<T>}
template<class T>
constexpr int superdex::kSimdDefaultSize = Unsupported architecture / sizeof(T)