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

Contains functions to compare vector registers. More...

#include "mjolnir/core/fundamental_types.h"
#include "mjolnir/core/x86/definitions.h"
#include <concepts>
#include "mjolnir/core/math/math.h"
#include "mjolnir/core/utility/bit_operations.h"
#include "mjolnir/core/utility/parameter_pack.h"
#include "mjolnir/core/x86/intrinsics.h"
#include "mjolnir/core/x86/x86.h"
#include <cstring>
#include <limits>
Include dependency graph for comparison.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 compare_all_equal (T_RegisterType lhs, T_RegisterType rhs) noexcept -> bool
 Return true only if all elements of two registers are equal. More...
 
template<FloatVectorRegister T_RegisterType>
auto compare_all_greater (T_RegisterType lhs, T_RegisterType rhs) noexcept -> bool
 Return true only if all elements of lhs are greater than the ones of rhs. More...
 
template<FloatVectorRegister T_RegisterType>
auto compare_all_greater_equal (T_RegisterType lhs, T_RegisterType rhs) noexcept -> bool
 Return true only if all elements of lhs are greater or equal than the ones of rhs. More...
 
template<FloatVectorRegister T_RegisterType>
auto compare_all_less (T_RegisterType lhs, T_RegisterType rhs) noexcept -> bool
 Return true only if all elements of lhs are less than the corresponding ones in rhs. More...
 
template<FloatVectorRegister T_RegisterType>
auto compare_all_less_equal (T_RegisterType lhs, T_RegisterType rhs) noexcept -> bool
 Return true only if all elements of lhs are less equal than the corresponding ones in rhs. More...
 
template<FloatVectorRegister T_RegisterType, std::invocable< T_RegisterType, T_RegisterType > T_CompFunc>
auto compare_all_true (T_RegisterType lhs, T_RegisterType rhs, T_CompFunc comp_func) noexcept -> bool
 Return true only if the element-wise comparisons of lhs and rhs yields true for all elements. More...
 
template<UST t_idx_start, UST t_idx_end, FloatVectorRegister T_RegisterType>
auto compare_in_sequence_equal (T_RegisterType lhs, T_RegisterType rhs) noexcept -> bool
 Return true only if all elements of both registers are equal inside of a specified sequence of indices. More...
 
template<UST t_idx_start, UST t_idx_end, FloatVectorRegister T_RegisterType>
auto compare_in_sequence_greater (T_RegisterType lhs, T_RegisterType rhs) noexcept -> bool
 Return true only if all elements of lhs are greater than in rhs inside of a specified sequence. More...
 
template<UST t_idx_start, UST t_idx_end, FloatVectorRegister T_RegisterType>
auto compare_in_sequence_greater_equal (T_RegisterType lhs, T_RegisterType rhs) noexcept -> bool
 Return true only if all elements of lhs are greater or equal than in rhs inside of a specified sequence. More...
 
template<UST t_idx_start, UST t_idx_end, FloatVectorRegister T_RegisterType>
auto compare_in_sequence_less (T_RegisterType lhs, T_RegisterType rhs) noexcept -> bool
 Return true only if all elements of lhs are less than in rhs inside of a specified sequence of indices. More...
 
template<UST t_idx_start, UST t_idx_end, FloatVectorRegister T_RegisterType>
auto compare_in_sequence_less_equal (T_RegisterType lhs, T_RegisterType rhs) noexcept -> bool
 Return true only if all elements of lhs are less equal than in rhs inside of a specified sequence of indices. More...
 
template<UST t_idx_first, UST t_length, FloatVectorRegister T_RegisterType, std::invocable< T_RegisterType, T_RegisterType > T_CompFunc>
auto compare_in_sequence_true (T_RegisterType lhs, T_RegisterType rhs, T_CompFunc comp_func) noexcept -> bool
 Return true only if the comparisons of all register elements are true inside of a specified sequence. More...
 
template<bool... t_cmp, FloatVectorRegister T_RegisterType>
auto compare_selected_equal (T_RegisterType lhs, T_RegisterType rhs) noexcept -> bool
 Return true only if all selected register elements are equal. More...
 
template<bool... t_cmp, FloatVectorRegister T_RegisterType>
auto compare_selected_greater (T_RegisterType lhs, T_RegisterType rhs) noexcept -> bool
 Return true only if all selected elements of lhs are greater than the corresponding ones in rhs. More...
 
template<bool... t_cmp, FloatVectorRegister T_RegisterType>
auto compare_selected_greater_equal (T_RegisterType lhs, T_RegisterType rhs) noexcept -> bool
 Return true only if all selected elements of lhs are greater or equal than the corresponding ones in rhs. More...
 
template<bool... t_cmp, FloatVectorRegister T_RegisterType>
auto compare_selected_less (T_RegisterType lhs, T_RegisterType rhs) noexcept -> bool
 Return true only if all selected elements of lhs are less than the corresponding ones in rhs. More...
 
template<bool... t_cmp, FloatVectorRegister T_RegisterType>
auto compare_selected_less_equal (T_RegisterType lhs, T_RegisterType rhs) noexcept -> bool
 Return true only if all selected elements of lhs are less equal than the corresponding ones in rhs. More...
 
template<bool... t_cmp, FloatVectorRegister T_RegisterType, std::invocable< T_RegisterType, T_RegisterType > T_CompFunc>
auto compare_selected_true (T_RegisterType lhs, T_RegisterType rhs, T_CompFunc comp_func) noexcept -> bool
 Return true only if the comparisons of all selected register elements yields true. More...
 
template<FloatVectorRegister T_RegisterType>
auto is_memory_zero (T_RegisterType a) noexcept -> bool
 Return true if the whole memory of the passed register is zero and false otherwise. More...
 

Detailed Description

Contains functions to compare vector registers.

comparison.h