Mjolnir Core
Core functionality of the Mjolnir API
Functions
intrinsics.h File Reference

Contains generalized/template versions of the x86 intrinsics. More...

#include "mjolnir/core/x86/definitions.h"
#include <concepts>
#include "mjolnir/core/utility/pointer_operations.h"
#include "mjolnir/core/x86/x86.h"
#include <cassert>
#include <utility>
Include dependency graph for intrinsics.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<FloatVectorRegister T_RegisterType>
auto mm_add (T_RegisterType lhs, T_RegisterType rhs) noexcept -> T_RegisterType
 Perform an element-wise addition of lhs and rhs and return the result. More...
 
template<FloatVectorRegister T_RegisterType>
auto mm_and (T_RegisterType a, T_RegisterType b) noexcept -> T_RegisterType
 Compute the bitwise AND of a and b. More...
 
template<FloatVectorRegister T_RegisterType>
auto mm_andnot (T_RegisterType a, T_RegisterType b) noexcept -> T_RegisterType
 Compute the bitwise NOT of all elements in a and then AND with b. More...
 
template<I32 t_mask, FloatVectorRegister T_RegisterType>
auto mm_blend (T_RegisterType a, T_RegisterType b) noexcept -> T_RegisterType
 Blend elements from a and b using a control mask and return the resulting vector register. More...
 
template<FloatVectorRegister T_RegisterType>
auto mm_broadcast (T_RegisterType src) noexcept -> T_RegisterType
 Broadcasts the lowest floating point element across lanes to all elements of the returned register. More...
 
template<FloatVectorRegister T_RegisterTypeIn>
auto mm_cast_fi (T_RegisterTypeIn src) noexcept
 Bit cast a floating-point vector register to an equally sized integer vector register. More...
 
template<FloatVectorRegister T_RegisterTypeOut, IntegerVectorRegister T_RegisterTypeIn>
auto mm_cast_if (T_RegisterTypeIn src) noexcept -> T_RegisterTypeOut
 Bit cast an integer vector register to an equally sized floating-point vector register. More...
 
template<FloatVectorRegister T_RegisterType>
auto mm_cmp_eq (T_RegisterType lhs, T_RegisterType rhs) noexcept -> T_RegisterType
 Compare the register elements in lhs and rhs for equality and return the result. More...
 
template<FloatVectorRegister T_RegisterType>
auto mm_cmp_ge (T_RegisterType lhs, T_RegisterType rhs) noexcept -> T_RegisterType
 Compare element-wise if the register elements of lhs are greater equal than the ones in rhs. More...
 
template<FloatVectorRegister T_RegisterType>
auto mm_cmp_gt (T_RegisterType lhs, T_RegisterType rhs) noexcept -> T_RegisterType
 Compare element-wise if the register elements of lhs are greater than the ones in rhs. More...
 
template<FloatVectorRegister T_RegisterType>
auto mm_cmp_le (T_RegisterType lhs, T_RegisterType rhs) noexcept -> T_RegisterType
 Compare element-wise if the register elements of lhs are less equal than the ones in rhs. More...
 
template<FloatVectorRegister T_RegisterType>
auto mm_cmp_lt (T_RegisterType lhs, T_RegisterType rhs) noexcept -> T_RegisterType
 Compare element-wise if the register elements of lhs are less than the ones in rhs. More...
 
template<FloatVectorRegister T_RegisterType>
auto mm_cvt_float (T_RegisterType src) -> ElementType< T_RegisterType >
 Return the first element of src. More...
 
template<FloatVectorRegister T_RegisterType>
auto mm_fmadd (T_RegisterType a, T_RegisterType b, T_RegisterType c) noexcept -> T_RegisterType
 Perform an element-wise multiplication of a and b, add c and return the result. More...
 
template<FloatVectorRegister T_RegisterType>
auto mm_fmsub (T_RegisterType a, T_RegisterType b, T_RegisterType c) noexcept -> T_RegisterType
 Perform an element-wise multiplication of a and b, subtract c and return the result. More...
 
template<FloatVectorRegister T_RegisterType>
auto mm_load (ElementType< T_RegisterType > *ptr) noexcept -> T_RegisterType
 Load data from an aligned memory location into a new register. More...
 
template<IntegerVectorRegister T_RegisterType>
auto mm_movemask_epi8 (T_RegisterType src) noexcept
 Create mask from the most significant bit of each 8-bit element in src, and return the result as unsigned integer. More...
 
template<FloatVectorRegister T_RegisterType>
auto mm_mul (T_RegisterType lhs, T_RegisterType rhs) noexcept -> T_RegisterType
 Perform an element-wise multiplication of lhs and rhs and return the result. More...
 
template<FloatVectorRegister T_RegisterType>
auto mm_or (T_RegisterType a, T_RegisterType b) noexcept -> T_RegisterType
 Compute the bitwise OR of a and b. More...
 
template<I32 t_mask, FloatVectorRegister T_RegisterType>
auto mm_permute (T_RegisterType src) noexcept -> T_RegisterType
 Shuffle the elements in src using the control mask t_mask and return the resulting vector register. More...
 
template<I32 t_mask, FloatAVXRegister T_RegisterType>
auto mm_permute2f128 (T_RegisterType a, T_RegisterType b) noexcept -> T_RegisterType
 Shuffle 128-bits lanes selected by t_mask from a and b, and return the results in a new register. More...
 
template<FloatVectorRegister T_RegisterType>
auto mm_set1 (ElementType< T_RegisterType > value) noexcept -> T_RegisterType
 Broadcast a single value a to all elements of the register. More...
 
template<FloatVectorRegister T_RegisterType, typename... T_Args>
auto mm_setr (T_Args... args) noexcept -> T_RegisterType
 Set register elements with the supplied values in reverse order. More...
 
template<FloatVectorRegister T_RegisterType>
auto mm_setzero () noexcept -> T_RegisterType
 Return a vector register with all elements set to zero. More...
 
template<UST t_mask, FloatVectorRegister T_RegisterType>
auto mm_shuffle (T_RegisterType a, T_RegisterType b) noexcept -> T_RegisterType
 Return a register with the first half of the lane elements selected from a and the second half from b. More...
 
template<FloatVectorRegister T_RegisterType>
void mm_store (ElementType< T_RegisterType > *ptr, T_RegisterType reg) noexcept
 Store the content of a register to a memory address. More...
 
template<FloatVectorRegister T_RegisterType>
auto mm_sub (T_RegisterType lhs, T_RegisterType rhs) noexcept -> T_RegisterType
 Subtract rhs element-wise from rhs and return the result. More...
 
template<FloatVectorRegister T_RegisterType>
auto mm_xor (T_RegisterType a, T_RegisterType b) noexcept -> T_RegisterType
 Compute the bitwise XOR of a and b. More...
 

Detailed Description

Contains generalized/template versions of the x86 intrinsics.

x86/intrinsics.h