1/* Copyright (C) 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_CONSTRUCT_EVAL_H
9#define LIBSIMDPP_SIMDPP_DETAIL_CONSTRUCT_EVAL_H
10
11#ifndef LIBSIMDPP_SIMD_H
12 #error "This file must be included through simd.h"
13#endif
14
15#include <simdpp/setup_arch.h>
16#include <simdpp/expr.h>
17
18namespace simdpp {
19namespace SIMDPP_ARCH_NAMESPACE {
20namespace detail {
21
22// put forward declarations of all construct_eval functions here. Definitions
23// are needed only if the corresponding expression is used
24
25template<class V> SIMDPP_INL
26void construct_eval(V& v, const expr_vec_load_splat& e);
27
28template<class V, class VE> SIMDPP_INL
29void construct_eval(V& v, const expr_vec_set_splat<VE>& e);
30
31template<class V> SIMDPP_INL
32void construct_eval(V& v, const expr_vec_load& e);
33
34template<class V> SIMDPP_INL
35void construct_eval(V& v, const expr_vec_load_u& e);
36
37template<class V, class VE, unsigned N> SIMDPP_INL
38void construct_eval(V& v, const expr_vec_make_const<VE, N>& e);
39
40template<class V> SIMDPP_INL
41void construct_eval(V& v, const expr_vec_make_ones& e);
42
43template<class V, class E> SIMDPP_INL
44void construct_eval_wrapper(V& v, const E& e)
45{
46 construct_eval(v, e);
47}
48
49} // namespace detail
50} // namespace SIMDPP_ARCH_NAMESPACE
51} // namespace simdpp
52
53#endif
54
55