1/*
2 * vector_impl.hpp
3 *
4 * Created on: Mar 8, 2015
5 * Author: Pietro Incardona
6 */
7
8#ifndef VECTOR_IMPL_HPP_
9#define VECTOR_IMPL_HPP_
10
11#include "util/common.hpp"
12
13#define STD_VECTOR 1
14#define OPENFPM_NATIVE 2
15
16namespace openfpm
17{
18 /*! \brief It analyze the type given and it select correctly the implementation
19 * for vector
20 *
21 * \tparam type to analyze
22 *
23 * [Example]
24 *
25 * vect_isel<T>::value
26 *
27 * will return 1 for std base implementation
28 * will return 2 for openfpm native implementation
29 *
30 * Basically the openfpm native implementation require that T
31 * has some specific structure, this class check for it, if T
32 * does not have this structure it fall to the case 1
33 *
34 */
35 template<typename T>
36 struct vect_isel
37 {
38 enum
39 {
40 value = is_typedef_and_data_same<has_typedef_type<T>::value && has_data<T>::value,T>::value + 1
41 };
42 };
43}
44
45
46#endif /* VECTOR_IMPL_HPP_ */
47