1 /* Copyright (C) 2013-2014 Povilas Kanapickas <povilas@radix.lt> 2 3 Distributed under the Boost Software License, Version 1.0. 4 (See accompanying file LICENSE_1_0.txt or copy at 5 http://www.boost.org/LICENSE_1_0.txt) 6 */ 7 8 #ifndef LIBSIMDPP_SIMDPP_DETAIL_EXPR_I_NEG_H 9 #define LIBSIMDPP_SIMDPP_DETAIL_EXPR_I_NEG_H 10 11 #ifndef LIBSIMDPP_SIMD_H 12 #error "This file must be included through simd.h" 13 #endif 14 15 #include <simdpp/types.h> 16 #include <simdpp/detail/insn/i_neg.h> 17 18 namespace simdpp { 19 namespace SIMDPP_ARCH_NAMESPACE { 20 namespace detail { 21 22 template<class R, class E> 23 struct expr_eval<R, expr_ineg<E>> { 24 static SIMDPP_INL R eval(const expr_ineg<E>& e) 25 { 26 return (R) insn::i_ineg(e.a.eval()); 27 } 28 }; 29 30 } // namespace detail 31 } // namespace SIMDPP_ARCH_NAMESPACE 32 } // namespace simdpp 33 34 #endif 35 36