6 #ifndef OPENMPCD_SCALAR_HPP
7 #define OPENMPCD_SCALAR_HPP
11 #include <boost/static_assert.hpp>
12 #include <boost/type_traits/is_floating_point.hpp>
13 #include <boost/utility/enable_if.hpp>
36 typename boost::enable_if<boost::is_floating_point<T>, T>::type
39 BOOST_STATIC_ASSERT(boost::is_floating_point<T>::value);
46 typename boost::enable_if<boost::is_floating_point<T>, T>::type
49 BOOST_STATIC_ASSERT(boost::is_floating_point<T>::value);
65 typename boost::enable_if<boost::is_floating_point<T>,
bool>::type
68 BOOST_STATIC_ASSERT(boost::is_floating_point<T>::value);
74 typename boost::enable_if<boost::is_floating_point<T>,
bool>::type
75 isZero(
const std::complex<T>& val)
77 BOOST_STATIC_ASSERT(boost::is_floating_point<T>::value);
79 return val == std::complex<T>(0, 0);