OpenFPM_data  0.1.0
Project that contain the implementation and interfaces for basic structure like vectors, grids, graph ... .
 All Data Structures Namespaces Functions Variables Typedefs Friends
se_vector.hpp
1 /*
2  * se_vector.hpp
3  *
4  * Created on: Oct 30, 2015
5  * Author: i-bird
6  */
7 
8 #ifndef OPENFPM_DATA_SRC_VECTOR_SE_VECTOR_HPP_
9 #define OPENFPM_DATA_SRC_VECTOR_SE_VECTOR_HPP_
10 
11 
16 #define VECTOR_ERROR 2000lu
17 
18 #define VECTOR_OVERFLOW_NATIVE(id) if (id >= v_size)\
19  {\
20  std::cerr << "Error " << __FILE__ << ":" << __LINE__ << " overflow id: " << id << "\n";\
21  size_t * err_code_pointer = (size_t *)&this->err_code;\
22  *err_code_pointer = 2001;\
23  ACTION_ON_ERROR(VECTOR_ERROR);\
24  }
25 
26 #endif /* OPENFPM_DATA_SRC_VECTOR_SE_VECTOR_HPP_ */