tesseract++ 0.0.1
N-dimensional tensor library for embedded systems
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
detail::KernelCompare< T, Bits, Arch > Struct Template Reference

#include <kernel_compare.h>

Public Types

using K = Microkernel< T, Bits, Arch >
 

Static Public Member Functions

template<typename Expr1 , typename Expr2 >
static FORCE_INLINE bool reduce_all_approx_equal (const Expr1 &lhs, const Expr2 &rhs, T tolerance) noexcept
 Check if all logical elements of two expressions are approximately equal.
 

Static Public Attributes

static constexpr my_size_t simdWidth = K::simdWidth
 

Member Typedef Documentation

◆ K

template<typename T , my_size_t Bits, typename Arch >
using detail::KernelCompare< T, Bits, Arch >::K = Microkernel<T, Bits, Arch>

Member Function Documentation

◆ reduce_all_approx_equal()

template<typename T , my_size_t Bits, typename Arch >
template<typename Expr1 , typename Expr2 >
static FORCE_INLINE bool detail::KernelCompare< T, Bits, Arch >::reduce_all_approx_equal ( const Expr1 &  lhs,
const Expr2 &  rhs,
tolerance 
)
inlinestaticnoexcept

Check if all logical elements of two expressions are approximately equal.

Dispatches based on layout compatibility:

  • Both unpermuted, same padding → fast physical slice iteration
  • Otherwise → logical flat iteration (handles any layout combination)

Both expressions must have the same logical dimensions. TODO: do we need to check this at compile time, or is it guaranteed by the caller? think...!

Parameters
toleranceApproximation tolerance for floating-point comparisons
Returns
true if all corresponding logical elements are approximately equal

Member Data Documentation

◆ simdWidth

template<typename T , my_size_t Bits, typename Arch >
constexpr my_size_t detail::KernelCompare< T, Bits, Arch >::simdWidth = K::simdWidth
staticconstexpr

The documentation for this struct was generated from the following file: