diff --git a/reco/L1/vectors/PSEUDO_F32vec4.h b/reco/L1/vectors/PSEUDO_F32vec4.h index 115c47fc4de905b1f12eeb5d16715cb0982ed5cd..47b66abeb58e73ec1769ca501721e150367ac91b 100644 --- a/reco/L1/vectors/PSEUDO_F32vec4.h +++ b/reco/L1/vectors/PSEUDO_F32vec4.h @@ -172,6 +172,15 @@ public: return strm; } + /// Checks, if all bands are equal + /// NOTE: two values defined as signaling_NaN() are not equal, thus if there are all or one + /// of the words are kNaN, the function returns false + bool IsHorizontallyEqual() const { return v[0] == v[1] && v[1] == v[2] && v[2] == v[3]; } + + /// Checks, if any of the bands is NaN + bool IsNanAny() const { return std::isnan(v[0]) || std::isnan(v[1]) || std::isnan(v[2]) || std::isnan(v[3]); } + + } __attribute__((aligned(16))); ;