1 /* This file is part of the Vc library.
3 Copyright (C) 2009 Matthias Kretz <kretz@kde.org>
5 Vc is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation, either version 3 of
8 the License, or (at your option) any later version.
10 Vc is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with Vc. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef INCLUDE_VC_LIMITS
21 #define INCLUDE_VC_LIMITS
24 #include "common/macros.h"
29 template<typename T> struct numeric_limits<Vc::Vector<T> > : public numeric_limits<typename Vc::Vector<T>::EntryType>
32 typedef numeric_limits<typename Vc::Vector<T>::EntryType> _Base;
34 static Vc_INTRINSIC Vc_CONST Vc::Vector<T> max() { return Vc::Vector<T>(_Base::max()); }
35 static Vc_INTRINSIC Vc_CONST Vc::Vector<T> min() { return Vc::Vector<T>(_Base::min()); }
36 static Vc_INTRINSIC Vc_CONST Vc::Vector<T> lowest() { return Vc::Vector<T>(_Base::lowest()); }
37 static Vc_INTRINSIC Vc_CONST Vc::Vector<T> epsilon() { return Vc::Vector<T>(_Base::epsilon()); }
38 static Vc_INTRINSIC Vc_CONST Vc::Vector<T> round_error() { return Vc::Vector<T>(_Base::round_error()); }
39 static Vc_INTRINSIC Vc_CONST Vc::Vector<T> infinity() { return Vc::Vector<T>(_Base::infinity()); }
40 static Vc_INTRINSIC Vc_CONST Vc::Vector<T> quiet_NaN() { return Vc::Vector<T>(_Base::quiet_NaN()); }
41 static Vc_INTRINSIC Vc_CONST Vc::Vector<T> signaling_NaN() { return Vc::Vector<T>(_Base::signaling_NaN()); }
42 static Vc_INTRINSIC Vc_CONST Vc::Vector<T> denorm_min() { return Vc::Vector<T>(_Base::denorm_min()); }
46 #include "common/undomacros.h"
48 # include "scalar/limits.h"
49 #elif defined(VC_IMPL_AVX)
50 # include "avx/limits.h"
51 #elif defined(VC_IMPL_SSE)
52 # include "sse/limits.h"
55 #endif // INCLUDE_VC_LIMITS