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_BIT_NOT_H
9#define LIBSIMDPP_SIMDPP_DETAIL_EXPR_BIT_NOT_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/bit_not.h>
17
18namespace simdpp {
19namespace SIMDPP_ARCH_NAMESPACE {
20namespace detail {
21
22template<class R, class E>
23struct expr_eval<R, expr_bit_not<E>> {
24 static SIMDPP_INL R eval(const expr_bit_not<E>& e)
25 {
26 // FIXME: this expression is not emitted at the moment
27 typename detail::get_expr_nosign<E>::type a;
28 a = e.a.eval();
29 return (R) insn::i_bit_not(a);
30 }
31};
32
33} // namespace detail
34} // namespace SIMDPP_ARCH_NAMESPACE
35} // namespace simdpp
36
37#endif
38