View on GitHub

Vistle

Distributed Data-parallel Scientific Visualization in VR

vec_impl.h
Go to the documentation of this file.
1#ifndef VEC_IMPL_H
2#define VEC_IMPL_H
3
4namespace vistle {
5
6#define V_IMPL_COMMA ,
7template<class T, int Dim>
8V_OBJECT_IMPL_LOAD(Vec<T V_IMPL_COMMA Dim>)
9
10template<class T, int Dim>
11V_OBJECT_IMPL_SAVE(Vec<T V_IMPL_COMMA Dim>)
12
13template<class T, int Dim>
14template<class Archive>
16{
17 ar &V_NAME(ar, "base_object", serialize_base<Base::Data>(ar, *this));
18 int dim = Dim;
19 ar &V_NAME(ar, "dim", dim);
20 assert(dim == Dim);
21 for (int c = 0; c < Dim; ++c) {
22 ar &V_NAME(ar, std::string("x" + std::to_string(c)).c_str(), x[c]);
23 }
24}
25
26#undef V_IMPL_COMMA
27
28} // namespace vistle
29
30#endif
#define V_NAME(ar, name, obj)
Definition: archives_config.h:441
Definition: vec.h:13
Definition: allobjects.cpp:30
#define V_OBJECT_IMPL_SAVE(ObjType)
Definition: object.h:574
#define V_OBJECT_IMPL_LOAD(ObjType)
Definition: object.h:560
ShmVector< T > x[Dim]
Definition: vec.h:87