35#ifndef _BLAZE_MATH_EXPRESSIONS_DVECDVECEQUALEXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_DVECDVECEQUALEXPR_H_
73struct DVecDVecEqualExprHelper
77 using CT1 = RemoveReference_t< CompositeType_t<VT1> >;
80 using CT2 = RemoveReference_t< CompositeType_t<VT2> >;
84 static constexpr bool value =
85 ( useOptimizedKernels &&
88 HasSIMDEqual_v< ElementType_t<CT1>, ElementType_t<CT2> > );
128 if( (*lhs).size() != (*rhs).size() )
return false;
136 for(
size_t i=0UL; i<a.size(); ++i )
137 if( !
equal<RF>( a[i], b[i] ) )
return false;
171 if( (*lhs).size() != (*rhs).size() )
return false;
180 const size_t N( a.size() );
182 const size_t ipos( remainder ?
prevMultiple( N, SIMDSIZE ) : N );
187 for( ; (i+SIMDSIZE*3UL) < ipos; i+=SIMDSIZE*4UL ) {
188 if( !
equal<RF>( a.load(i ), b.load(i ) ) )
return false;
189 if( !
equal<RF>( a.load(i+SIMDSIZE ), b.load(i+SIMDSIZE ) ) )
return false;
190 if( !
equal<RF>( a.load(i+SIMDSIZE*2UL), b.load(i+SIMDSIZE*2UL) ) )
return false;
191 if( !
equal<RF>( a.load(i+SIMDSIZE*3UL), b.load(i+SIMDSIZE*3UL) ) )
return false;
193 for( ; (i+SIMDSIZE) < ipos; i+=SIMDSIZE*2UL ) {
194 if( !
equal<RF>( a.load(i ), b.load(i ) ) )
return false;
195 if( !
equal<RF>( a.load(i+SIMDSIZE), b.load(i+SIMDSIZE) ) )
return false;
197 for( ; i<ipos; i+=SIMDSIZE ) {
198 if( !
equal<RF>( a.load(i), b.load(i) ) )
return false;
200 for( ; remainder && i<N; ++i ) {
201 if( !
equal<RF>( a[i], b[i] ) )
return false;
218template<
typename VT1
237template<
typename VT1
Header file for auxiliary alias declarations.
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.
Definition Aliases.h:110
Header file for the EnableIf class template.
Header file for the HasSIMDEqual type trait.
Header file for the IsPadded type trait.
Deactivation of problematic macros.
Header file for the prevMultiple shim.
Header file for the relaxation flag enumeration.
Header file for the RemoveReference type trait.
Header file for all SIMD functionality.
Base class for N-dimensional dense vectors.
Definition DenseVector.h:77
SIMD characteristics of data types.
Definition SIMDTrait.h:297
Header file for the DenseVector base class.
constexpr bool IsPadded_v
Auxiliary variable template for the IsPadded type trait.
Definition IsPadded.h:134
RelaxationFlag
Relaxation flag for strict or relaxed semantics.
Definition RelaxationFlag.h:66
BLAZE_ALWAYS_INLINE constexpr auto prevMultiple(T1 value, T2 factor) noexcept
Rounds down an integral value to the previous multiple of a given factor.
Definition PrevMultiple.h:68
constexpr bool operator==(const NegativeAccuracy< A > &lhs, const T &rhs)
Equality comparison between a NegativeAccuracy object and a floating point value.
Definition Accuracy.h:253
constexpr bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition Accuracy.h:293
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition Matrix.h:676
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition Assert.h:101
bool equal(const SharedValue< T1 > &lhs, const SharedValue< T2 > &rhs)
Equality check for a two shared values.
Definition SharedValue.h:343
typename RemoveReference< T >::Type RemoveReference_t
Auxiliary alias declaration for the RemoveReference type trait.
Definition RemoveReference.h:95
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition EnableIf.h:138
typename EnableIf<!Condition, T >::Type DisableIf_t
Auxiliary type for the EnableIf class template.
Definition EnableIf.h:175
Header file for the equal shim.
System settings for performance optimizations.
Header file for basic type definitions.