/* This file is part of the Vc library. Copyright (C) 2009 Matthias Kretz Vc is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Vc is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with Vc. If not, see . */ #ifndef INCLUDE_VC_LIMITS #define INCLUDE_VC_LIMITS #include "vector.h" #include "common/macros.h" #include namespace std { template struct numeric_limits > : public numeric_limits::EntryType> { private: typedef numeric_limits::EntryType> _Base; public: static Vc_INTRINSIC Vc_CONST Vc::Vector max() { return Vc::Vector(_Base::max()); } static Vc_INTRINSIC Vc_CONST Vc::Vector min() { return Vc::Vector(_Base::min()); } static Vc_INTRINSIC Vc_CONST Vc::Vector lowest() { return Vc::Vector(_Base::lowest()); } static Vc_INTRINSIC Vc_CONST Vc::Vector epsilon() { return Vc::Vector(_Base::epsilon()); } static Vc_INTRINSIC Vc_CONST Vc::Vector round_error() { return Vc::Vector(_Base::round_error()); } static Vc_INTRINSIC Vc_CONST Vc::Vector infinity() { return Vc::Vector(_Base::infinity()); } static Vc_INTRINSIC Vc_CONST Vc::Vector quiet_NaN() { return Vc::Vector(_Base::quiet_NaN()); } static Vc_INTRINSIC Vc_CONST Vc::Vector signaling_NaN() { return Vc::Vector(_Base::signaling_NaN()); } static Vc_INTRINSIC Vc_CONST Vc::Vector denorm_min() { return Vc::Vector(_Base::denorm_min()); } }; } // namespace std #include "common/undomacros.h" #ifdef VC_IMPL_Scalar # include "scalar/limits.h" #elif defined(VC_IMPL_AVX) # include "avx/limits.h" #elif defined(VC_IMPL_SSE) # include "sse/limits.h" #endif #endif // INCLUDE_VC_LIMITS // vim: ft=cpp