template<typename v_src, typename v_dst, int... prp>
struct object_s_di< v_src, v_dst, OBJ_ENCAP, prp... >
It copy the properties from one object to another.
Given a set of properties for the destination object (0,1,3) it copy that properties to the source object properties (0,1,2)
For object we mean an object that follow the OpenFPM data structure format, see openFPM_data wiki for more information
Create a compile-time object and copy <em>to</em> the selected properties
boost::fusion::at_c<0>(src.data) = 1.0;
boost::fusion::at_c<1>(src.data) = 2.0;
for (size_t i = 0 ; i < 3 ; i++)
boost::fusion::at_c<2>(src.data)[i] = i + 5.0;
BOOST_REQUIRE_EQUAL(boost::fusion::at_c<p::x>(dst.data),1.0);
BOOST_REQUIRE_EQUAL(boost::fusion::at_c<p::y>(dst.data),2.0);
for (size_t i = 0 ; i < 3 ; i++)
BOOST_REQUIRE_EQUAL(boost::fusion::at_c<p::v>(dst.data)[i],i + 5.0);
Test structure used for several test.
boost::fusion::vector< T, T, T, T, T[3], T[3][3]> type
declaration of what the Point_test store
It create a boost::fusion vector with the selected properties.
It copy the properties from one object to another.
This is a container to create a general object.
Create a compile-time Encap object and copy <em>to</em> the selected properties
v_point.resize(2);
v_point_red.resize(2);
v_point_red.template get<0>(0) = 11.0;
v_point_red.template get<1>(0) = 12.0;
for (size_t i = 0 ; i < 3 ; i++)
v_point_red.template get<2>(0)[i] = i + 15.0;
auto dst_e = v_point.get(0);
auto src_e = v_point_red.get(0);
BOOST_REQUIRE_EQUAL(v_point.get(0).template get<p::x>(),11.0);
BOOST_REQUIRE_EQUAL(v_point.get(0).template get<p::y>(),12.0);
for (size_t i = 0 ; i < 3 ; i++)
BOOST_REQUIRE_EQUAL(v_point.get(0).template get<p::v>()[i],i + 15.0);
Implementation of 1-D std::vector like structure.
Definition at line 466 of file object_s_di.hpp.