Commit 99436bef authored by incardon's avatar incardon

Removing type dependencied from type

parent b1bace58
......@@ -290,7 +290,7 @@ class Packer<T,Mem,PACKER_GRID>
template <typename it, typename dtype, int ... prp> static void pack_with_iterator(it & sub_it, T & obj, dtype & dest)
{
// Sending property object
typedef object<typename object_creator<typename T::type::type,prp...>::type> prp_object;
typedef object<typename object_creator<typename T::value_type::type,prp...>::type> prp_object;
size_t id = 0;
......@@ -298,7 +298,7 @@ class Packer<T,Mem,PACKER_GRID>
while (sub_it.isNext())
{
// copy all the object in the send buffer
typedef encapc<T::dims,typename T::type,typename T::memory_conf > encap_src;
typedef encapc<T::dims,typename T::value_type,typename T::memory_conf > encap_src;
// destination object type
typedef encapc<1,prp_object,typename dtype::memory_conf > encap_dst;
......@@ -367,7 +367,7 @@ public:
#endif
// Sending property object
typedef object<typename object_creator<typename T::type::type,prp...>::type> prp_object;
typedef object<typename object_creator<typename T::value_type::type,prp...>::type> prp_object;
typedef openfpm::vector<prp_object,openfpm::device_cpu<prp_object>,ExtPreAlloc<Mem>,openfpm::grow_policy_identity> dtype;
// Create an object over the preallocated memory (No allocation is produced)
......@@ -410,7 +410,7 @@ public:
template<int ... prp> static void packRequest(T & obj, grid_key_dx_iterator_sub<T::dims> & sub, std::vector<size_t> & v)
{
// Sending property object
typedef object<typename object_creator<typename T::type::type,prp...>::type> prp_object;
typedef object<typename object_creator<typename T::value_type::type,prp...>::type> prp_object;
typedef openfpm::vector<prp_object,openfpm::device_cpu<prp_object>,ExtPreAlloc<Mem>,openfpm::grow_policy_identity> dtype;
// Calculate the required memory for packing
......
......@@ -204,13 +204,13 @@ class Unpacker<T,Mem,PACKER_GRID>
size_t id = 0;
// Sending property object
typedef object<typename object_creator<typename T::type::type,prp...>::type> prp_object;
typedef object<typename object_creator<typename T::value_type::type,prp...>::type> prp_object;
// unpacking the information
while (sub_it.isNext())
{
// copy all the object in the send buffer
typedef encapc<T::dims,typename T::type,typename T::memory_conf > encap_dst;
typedef encapc<T::dims,typename T::value_type,typename T::memory_conf > encap_dst;
// destination object type
typedef encapc<1,prp_object,typename grid_cpu<T::dims,prp_object>::memory_conf > encap_src;
......@@ -268,7 +268,7 @@ public:
template<unsigned int ... prp> static void unpack(ExtPreAlloc<Mem> & mem, grid_key_dx_iterator_sub<T::dims> & sub_it, T & obj, Unpack_stat & ps)
{
// object that store the information in mem
typedef object<typename object_creator<typename T::type::type,prp...>::type> prp_object;
typedef object<typename object_creator<typename T::value_type::type,prp...>::type> prp_object;
typedef openfpm::vector<prp_object,openfpm::device_cpu<prp_object>,PtrMemory,openfpm::grow_policy_identity> stype;
size_t size = stype::calculateMem(sub_it.getVolume(),0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment