Commit ec95a342 authored by incardon's avatar incardon

Fixing VCluster template parameter

parent 03255a6d
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include "util/print_stack.hpp" #include "util/print_stack.hpp"
#include "util/math_util_complex.hpp" #include "util/math_util_complex.hpp"
Vcluster * global_v_cluster_private = NULL; Vcluster<> * global_v_cluster_private = NULL;
// //
std::vector<int> sieve_spf; std::vector<int> sieve_spf;
......
...@@ -35,8 +35,11 @@ void bt_sighandler(int sig, siginfo_t * info, void * ctx); ...@@ -35,8 +35,11 @@ void bt_sighandler(int sig, siginfo_t * info, void * ctx);
* \snippet VCluster_unit_test_util.hpp message alloc * \snippet VCluster_unit_test_util.hpp message alloc
* *
*/ */
class Vcluster: public Vcluster_base template<typename InternalMemory = HeapMemory>
class Vcluster: public Vcluster_base<InternalMemory>
{ {
typedef Vcluster_base<InternalMemory> self_base;
template<typename T> template<typename T>
struct index_gen {}; struct index_gen {};
...@@ -125,10 +128,10 @@ class Vcluster: public Vcluster_base ...@@ -125,10 +128,10 @@ class Vcluster: public Vcluster_base
pack_unpack_cond_with_prp<has_max_prop<T, has_value_type<T>::value>::value, op, T, S, layout_base>::packing(mem, send.get(i), sts, send_buf,opt); pack_unpack_cond_with_prp<has_max_prop<T, has_value_type<T>::value>::value, op, T, S, layout_base>::packing(mem, send.get(i), sts, send_buf,opt);
} }
tags.clear(); self_base::tags.clear();
// receive information // receive information
base_info bi(&recv_buf,prc_recv,sz_recv_byte,tags,opt); base_info bi(&this->recv_buf,prc_recv,sz_recv_byte,this->tags,opt);
// Send and recv multiple messages // Send and recv multiple messages
if (opt & RECEIVE_KNOWN) if (opt & RECEIVE_KNOWN)
...@@ -145,24 +148,24 @@ class Vcluster: public Vcluster_base ...@@ -145,24 +148,24 @@ class Vcluster: public Vcluster_base
else else
{std::cout << __FILE__ << ":" << __LINE__ << " Error " << demangle(typeid(T).name()) << " the type does not work with the option or NO_CHANGE_ELEMENTS" << std::endl;} {std::cout << __FILE__ << ":" << __LINE__ << " Error " << demangle(typeid(T).name()) << " the type does not work with the option or NO_CHANGE_ELEMENTS" << std::endl;}
Vcluster_base::sendrecvMultipleMessagesNBX(prc_send.size(),(size_t *)send_sz_byte.getPointer(),(size_t *)prc_send.getPointer(),(void **)send_buf.getPointer(), self_base::sendrecvMultipleMessagesNBX(prc_send.size(),(size_t *)send_sz_byte.getPointer(),(size_t *)prc_send.getPointer(),(void **)send_buf.getPointer(),
prc_recv.size(),(size_t *)prc_recv.getPointer(),(size_t *)sz_recv_byte.getPointer(),msg_alloc_known,(void *)&bi); prc_recv.size(),(size_t *)prc_recv.getPointer(),(size_t *)sz_recv_byte.getPointer(),msg_alloc_known,(void *)&bi);
} }
else else
{ {
Vcluster_base::sendrecvMultipleMessagesNBX(prc_send.size(),(size_t *)send_sz_byte.getPointer(),(size_t *)prc_send.getPointer(),(void **)send_buf.getPointer(), self_base::sendrecvMultipleMessagesNBX(prc_send.size(),(size_t *)send_sz_byte.getPointer(),(size_t *)prc_send.getPointer(),(void **)send_buf.getPointer(),
prc_recv.size(),(size_t *)prc_recv.getPointer(),msg_alloc_known,(void *)&bi); prc_recv.size(),(size_t *)prc_recv.getPointer(),msg_alloc_known,(void *)&bi);
sz_recv_byte = sz_recv_tmp; sz_recv_byte = self_base::sz_recv_tmp;
} }
} }
else else
{ {
prc_recv.clear(); prc_recv.clear();
sendrecvMultipleMessagesNBX(prc_send_.size(),(size_t *)send_sz_byte.getPointer(),(size_t *)prc_send_.getPointer(),(void **)send_buf.getPointer(),msg_alloc,(void *)&bi); self_base::sendrecvMultipleMessagesNBX(prc_send_.size(),(size_t *)send_sz_byte.getPointer(),(size_t *)prc_send_.getPointer(),(void **)send_buf.getPointer(),msg_alloc,(void *)&bi);
} }
// Reorder the buffer // Reorder the buffer
reorder_buffer(prc_recv,tags,sz_recv_byte); reorder_buffer(prc_recv,self_base::tags,sz_recv_byte);
mem.decRef(); mem.decRef();
delete &mem; delete &mem;
...@@ -175,10 +178,10 @@ class Vcluster: public Vcluster_base ...@@ -175,10 +178,10 @@ class Vcluster: public Vcluster_base
*/ */
void reset_recv_buf() void reset_recv_buf()
{ {
for (size_t i = 0 ; i < recv_buf.size() ; i++) for (size_t i = 0 ; i < self_base::recv_buf.size() ; i++)
recv_buf.get(i).resize(0); {self_base::recv_buf.get(i).resize(0);}
recv_buf.resize(0); self_base::recv_buf.resize(0);
} }
/*! \brief Base info /*! \brief Base info
...@@ -191,7 +194,7 @@ class Vcluster: public Vcluster_base ...@@ -191,7 +194,7 @@ class Vcluster: public Vcluster_base
struct base_info struct base_info
{ {
//! Receive buffer //! Receive buffer
openfpm::vector<BHeapMemory> * recv_buf; openfpm::vector<BMemory<HeapMemory>> * recv_buf;
//! receiving processor list //! receiving processor list
openfpm::vector<size_t> & prc; openfpm::vector<size_t> & prc;
//! size of each message //! size of each message
...@@ -203,7 +206,7 @@ class Vcluster: public Vcluster_base ...@@ -203,7 +206,7 @@ class Vcluster: public Vcluster_base
size_t opt; size_t opt;
//! constructor //! constructor
base_info(openfpm::vector<BHeapMemory> * recv_buf, openfpm::vector<size_t> & prc, openfpm::vector<size_t> & sz, openfpm::vector<size_t> & tags,size_t opt) base_info(openfpm::vector<BMemory<HeapMemory>> * recv_buf, openfpm::vector<size_t> & prc, openfpm::vector<size_t> & sz, openfpm::vector<size_t> & tags,size_t opt)
:recv_buf(recv_buf),prc(prc),sz(sz),tags(tags),opt(opt) :recv_buf(recv_buf),prc(prc),sz(sz),tags(tags),opt(opt)
{} {}
}; };
...@@ -308,9 +311,9 @@ class Vcluster: public Vcluster_base ...@@ -308,9 +311,9 @@ class Vcluster: public Vcluster_base
size_t opt) size_t opt)
{ {
if (sz != NULL) if (sz != NULL)
sz->resize(recv_buf.size()); {sz->resize(self_base::recv_buf.size());}
pack_unpack_cond_with_prp<has_max_prop<T, has_value_type<T>::value>::value,op, T, S, layout_base, prp... >::unpacking(recv, recv_buf, sz, sz_byte, op_param,opt); pack_unpack_cond_with_prp<has_max_prop<T, has_value_type<T>::value>::value,op, T, S, layout_base, prp... >::unpacking(recv, self_base::recv_buf, sz, sz_byte, op_param,opt);
} }
public: public:
...@@ -322,7 +325,7 @@ class Vcluster: public Vcluster_base ...@@ -322,7 +325,7 @@ class Vcluster: public Vcluster_base
* *
*/ */
Vcluster(int *argc, char ***argv) Vcluster(int *argc, char ***argv)
:Vcluster_base(argc,argv) :Vcluster_base<InternalMemory>(argc,argv)
{ {
} }
...@@ -413,19 +416,19 @@ class Vcluster: public Vcluster_base ...@@ -413,19 +416,19 @@ class Vcluster: public Vcluster_base
reset_recv_buf(); reset_recv_buf();
// If we are on master collect the information // If we are on master collect the information
if (getProcessUnitID() == root) if (self_base::getProcessUnitID() == root)
{ {
// send buffer (master does not send anything) so send req and send_buf // send buffer (master does not send anything) so send req and send_buf
// remain buffer with size 0 // remain buffer with size 0
openfpm::vector<size_t> send_req; openfpm::vector<size_t> send_req;
tags.clear(); self_base::tags.clear();
// receive information // receive information
base_info bi(&recv_buf,prc,sz,tags,0); base_info bi(&this->recv_buf,prc,sz,this->tags,0);
// Send and recv multiple messages // Send and recv multiple messages
sendrecvMultipleMessagesNBX(send_req.size(),NULL,NULL,NULL,msg_alloc,&bi); self_base::sendrecvMultipleMessagesNBX(send_req.size(),NULL,NULL,NULL,msg_alloc,&bi);
// we generate the list of the properties to unpack // we generate the list of the properties to unpack
typedef typename ::generate_indexes<int, has_max_prop<T, has_value_type<T>::value>::number, MetaFuncOrd>::result ind_prop_to_pack; typedef typename ::generate_indexes<int, has_max_prop<T, has_value_type<T>::value>::number, MetaFuncOrd>::result ind_prop_to_pack;
...@@ -434,7 +437,7 @@ class Vcluster: public Vcluster_base ...@@ -434,7 +437,7 @@ class Vcluster: public Vcluster_base
op_ssend_recv_add<void> opa; op_ssend_recv_add<void> opa;
// Reorder the buffer // Reorder the buffer
reorder_buffer(prc,tags,sz); reorder_buffer(prc,self_base::tags,sz);
index_gen<ind_prop_to_pack>::template process_recv<op_ssend_recv_add<void>,T,S,layout_base>(*this,recv,&sz,NULL,opa,0); index_gen<ind_prop_to_pack>::template process_recv<op_ssend_recv_add<void>,T,S,layout_base>(*this,recv,&sz,NULL,opa,0);
...@@ -473,13 +476,13 @@ class Vcluster: public Vcluster_base ...@@ -473,13 +476,13 @@ class Vcluster: public Vcluster_base
pack_unpack_cond_with_prp_inte_lin<T>::construct_prc(send_prc,send_prc_); pack_unpack_cond_with_prp_inte_lin<T>::construct_prc(send_prc,send_prc_);
tags.clear(); self_base::tags.clear();
// receive information // receive information
base_info bi(NULL,prc,sz,tags,0); base_info bi(NULL,prc,sz,self_base::tags,0);
// Send and recv multiple messages // Send and recv multiple messages
sendrecvMultipleMessagesNBX(send_prc_.size(),(size_t *)sz.getPointer(),(size_t *)send_prc_.getPointer(),(void **)send_buf.getPointer(),msg_alloc,(void *)&bi,NONE); self_base::sendrecvMultipleMessagesNBX(send_prc_.size(),(size_t *)sz.getPointer(),(size_t *)send_prc_.getPointer(),(void **)send_buf.getPointer(),msg_alloc,(void *)&bi,NONE);
mem.decRef(); mem.decRef();
delete &mem; delete &mem;
...@@ -520,7 +523,7 @@ class Vcluster: public Vcluster_base ...@@ -520,7 +523,7 @@ class Vcluster: public Vcluster_base
reset_recv_buf(); reset_recv_buf();
// If we are on master scatter the information // If we are on master scatter the information
if (getProcessUnitID() == root) if (self_base::getProcessUnitID() == root)
{ {
// Prepare the sending buffer // Prepare the sending buffer
openfpm::vector<const void *> send_buf; openfpm::vector<const void *> send_buf;
...@@ -538,13 +541,13 @@ class Vcluster: public Vcluster_base ...@@ -538,13 +541,13 @@ class Vcluster: public Vcluster_base
ptr += sz.get(i); ptr += sz.get(i);
} }
tags.clear(); self_base::tags.clear();
// receive information // receive information
base_info bi(&recv_buf,prc,sz,tags,0); base_info bi(&this->recv_buf,prc,sz,this->tags,0);
// Send and recv multiple messages // Send and recv multiple messages
sendrecvMultipleMessagesNBX(prc.size(),(size_t *)sz_byte.getPointer(),(size_t *)prc.getPointer(),(void **)send_buf.getPointer(),msg_alloc,(void *)&bi); self_base::sendrecvMultipleMessagesNBX(prc.size(),(size_t *)sz_byte.getPointer(),(size_t *)prc.getPointer(),(void **)send_buf.getPointer(),msg_alloc,(void *)&bi);
// we generate the list of the properties to pack // we generate the list of the properties to pack
typedef typename ::generate_indexes<int, has_max_prop<T, has_value_type<T>::value>::number, MetaFuncOrd>::result ind_prop_to_pack; typedef typename ::generate_indexes<int, has_max_prop<T, has_value_type<T>::value>::number, MetaFuncOrd>::result ind_prop_to_pack;
...@@ -559,13 +562,13 @@ class Vcluster: public Vcluster_base ...@@ -559,13 +562,13 @@ class Vcluster: public Vcluster_base
// The non-root receive // The non-root receive
openfpm::vector<size_t> send_req; openfpm::vector<size_t> send_req;
tags.clear(); self_base::tags.clear();
// receive information // receive information
base_info bi(&recv_buf,prc,sz,tags,0); base_info bi(&this->recv_buf,prc,sz,this->tags,0);
// Send and recv multiple messages // Send and recv multiple messages
sendrecvMultipleMessagesNBX(send_req.size(),NULL,NULL,NULL,msg_alloc,&bi); self_base::sendrecvMultipleMessagesNBX(send_req.size(),NULL,NULL,NULL,msg_alloc,&bi);
// we generate the list of the properties to pack // we generate the list of the properties to pack
typedef typename ::generate_indexes<int, has_max_prop<T, has_value_type<T>::value>::number, MetaFuncOrd>::result ind_prop_to_pack; typedef typename ::generate_indexes<int, has_max_prop<T, has_value_type<T>::value>::number, MetaFuncOrd>::result ind_prop_to_pack;
...@@ -615,7 +618,7 @@ class Vcluster: public Vcluster_base ...@@ -615,7 +618,7 @@ class Vcluster: public Vcluster_base
openfpm::vector<recv_buff_reorder> rcv; openfpm::vector<recv_buff_reorder> rcv;
rcv.resize(recv_buf.size()); rcv.resize(self_base::recv_buf.size());
for (size_t i = 0 ; i < rcv.size() ; i++) for (size_t i = 0 ; i < rcv.size() ; i++)
{ {
...@@ -627,7 +630,7 @@ class Vcluster: public Vcluster_base ...@@ -627,7 +630,7 @@ class Vcluster: public Vcluster_base
// we sort based on processor // we sort based on processor
rcv.sort(); rcv.sort();
openfpm::vector<BHeapMemory> recv_ord; openfpm::vector<BMemory<HeapMemory>> recv_ord;
recv_ord.resize(rcv.size()); recv_ord.resize(rcv.size());
openfpm::vector<size_t> prc_ord; openfpm::vector<size_t> prc_ord;
...@@ -639,13 +642,13 @@ class Vcluster: public Vcluster_base ...@@ -639,13 +642,13 @@ class Vcluster: public Vcluster_base
// Now we reorder rcv // Now we reorder rcv
for (size_t i = 0 ; i < rcv.size() ; i++) for (size_t i = 0 ; i < rcv.size() ; i++)
{ {
recv_ord.get(i).swap(recv_buf.get(rcv.get(i).pos)); recv_ord.get(i).swap(self_base::recv_buf.get(rcv.get(i).pos));
prc_ord.get(i) = rcv.get(i).proc; prc_ord.get(i) = rcv.get(i).proc;
sz_recv_ord.get(i) = sz_recv.get(rcv.get(i).pos); sz_recv_ord.get(i) = sz_recv.get(rcv.get(i).pos);
} }
// move rcv into recv // move rcv into recv
recv_buf.swap(recv_ord); self_base::recv_buf.swap(recv_ord);
prc.swap(prc_ord); prc.swap(prc_ord);
sz_recv.swap(sz_recv_ord); sz_recv.swap(sz_recv_ord);
...@@ -859,7 +862,7 @@ class Vcluster: public Vcluster_base ...@@ -859,7 +862,7 @@ class Vcluster: public Vcluster_base
// Function to initialize the global VCluster // // Function to initialize the global VCluster //
extern Vcluster * global_v_cluster_private; extern Vcluster<> * global_v_cluster_private;
/*! \brief Initialize a global instance of Runtime Virtual Cluster Machine /*! \brief Initialize a global instance of Runtime Virtual Cluster Machine
* *
...@@ -870,7 +873,7 @@ extern Vcluster * global_v_cluster_private; ...@@ -870,7 +873,7 @@ extern Vcluster * global_v_cluster_private;
static inline void init_global_v_cluster_private(int *argc, char ***argv) static inline void init_global_v_cluster_private(int *argc, char ***argv)
{ {
if (global_v_cluster_private == NULL) if (global_v_cluster_private == NULL)
global_v_cluster_private = new Vcluster(argc,argv); {global_v_cluster_private = new Vcluster<>(argc,argv);}
} }
static inline void delete_global_v_cluster_private() static inline void delete_global_v_cluster_private()
...@@ -878,7 +881,7 @@ static inline void delete_global_v_cluster_private() ...@@ -878,7 +881,7 @@ static inline void delete_global_v_cluster_private()
delete global_v_cluster_private; delete global_v_cluster_private;
} }
static inline Vcluster & create_vcluster() static inline Vcluster<> & create_vcluster()
{ {
#ifdef SE_CLASS1 #ifdef SE_CLASS1
......
...@@ -104,7 +104,7 @@ union red ...@@ -104,7 +104,7 @@ union red
* \snippet VCluster_unit_test_util.hpp allGather numbers * \snippet VCluster_unit_test_util.hpp allGather numbers
* *
*/ */
template<typename InternalMemory>
class Vcluster_base class Vcluster_base
{ {
//! log file //! log file
...@@ -198,7 +198,7 @@ class Vcluster_base ...@@ -198,7 +198,7 @@ class Vcluster_base
protected: protected:
//! Receive buffers //! Receive buffers
openfpm::vector<BHeapMemory> recv_buf; openfpm::vector<BMemory<InternalMemory>> recv_buf;
//! tags receiving //! tags receiving
openfpm::vector<size_t> tags; openfpm::vector<size_t> tags;
......
...@@ -17,7 +17,7 @@ struct unpack_selector_with_prp ...@@ -17,7 +17,7 @@ struct unpack_selector_with_prp
template<typename op, template<typename op,
int ... prp> int ... prp>
static void call_unpack(S & recv, static void call_unpack(S & recv,
openfpm::vector<BHeapMemory> & recv_buf, openfpm::vector<BMemory<HeapMemory>> & recv_buf,
openfpm::vector<size_t> * sz, openfpm::vector<size_t> * sz,
openfpm::vector<size_t> * sz_byte, openfpm::vector<size_t> * sz_byte,
op & op_param, op & op_param,
...@@ -60,7 +60,7 @@ struct unpack_each_prop_buffer ...@@ -60,7 +60,7 @@ struct unpack_each_prop_buffer
{ {
S & recv; S & recv;
openfpm::vector<BHeapMemory> & recv_buf; openfpm::vector<BMemory<HeapMemory>> & recv_buf;
size_t i; size_t i;
...@@ -76,7 +76,7 @@ struct unpack_each_prop_buffer ...@@ -76,7 +76,7 @@ struct unpack_each_prop_buffer
* *
*/ */
inline unpack_each_prop_buffer(S & recv, inline unpack_each_prop_buffer(S & recv,
openfpm::vector<BHeapMemory> & recv_buf, openfpm::vector<BMemory<HeapMemory>> & recv_buf,
op & op_param, op & op_param,
size_t i, size_t i,
openfpm::vector<size_t> * sz, openfpm::vector<size_t> * sz,
...@@ -141,22 +141,26 @@ struct process_receive_mem_traits_inte ...@@ -141,22 +141,26 @@ struct process_receive_mem_traits_inte
size_t i; size_t i;
//! Receive buffer //! Receive buffer
openfpm::vector<BHeapMemory> & recv_buf; openfpm::vector<BMemory<HeapMemory>> & recv_buf;
//! Fake vector that map over received memory //! Fake vector that map over received memory
openfpm::vector<typename sT::value_type,PtrMemory,typename layout_base<typename sT::value_type>::type,layout_base,openfpm::grow_policy_identity> & v2; openfpm::vector<typename sT::value_type,PtrMemory,typename layout_base<typename sT::value_type>::type,layout_base,openfpm::grow_policy_identity> & v2;
size_t n_ele = 0; size_t n_ele = 0;
// options
size_t opt;
/*! \brief constructor /*! \brief constructor
* *
* \param v set of pointer buffers to set * \param v set of pointer buffers to set
* *
*/ */
inline process_receive_mem_traits_inte(openfpm::vector<typename sT::value_type,PtrMemory,typename layout_base<typename sT::value_type>::type,layout_base,openfpm::grow_policy_identity> & v2, inline process_receive_mem_traits_inte(openfpm::vector<typename sT::value_type,PtrMemory,typename layout_base<typename sT::value_type>::type,layout_base,openfpm::grow_policy_identity> & v2,
openfpm::vector<BHeapMemory> & recv_buf, openfpm::vector<BMemory<HeapMemory>> & recv_buf,
size_t i) size_t i,
:i(i),recv_buf(recv_buf),v2(v2) size_t opt)
:i(i),recv_buf(recv_buf),v2(v2),opt(opt)
{}; {};
//! It call the copy function for each property //! It call the copy function for each property
...@@ -168,8 +172,23 @@ struct process_receive_mem_traits_inte ...@@ -168,8 +172,23 @@ struct process_receive_mem_traits_inte
// calculate the number of received elements // calculate the number of received elements
this->n_ele = recv_buf.get(i).size() / sizeof(type_prp); this->n_ele = recv_buf.get(i).size() / sizeof(type_prp);
// add the received particles to the vector PtrMemory * ptr1;
PtrMemory * ptr1 = new PtrMemory(recv_buf.get(i).getPointer(),recv_buf.get(i).size());
if (opt == MPI_GPU_DIRECT)
{
#if defined(MPIX_CUDA_AWARE_SUPPORT) && MPIX_CUDA_AWARE_SUPPORT
// add the received particles to the vector
ptr1 = new PtrMemory(recv_buf.get(i).getDevicePointer(),recv_buf.get(i).size());
#else
// add the received particles to the vector
ptr1 = new PtrMemory(recv_buf.get(i).getPointer(),recv_buf.get(i).size());
#endif
}
else
{
// add the received particles to the vector
ptr1 = new PtrMemory(recv_buf.get(i).getPointer(),recv_buf.get(i).size());
}
v2.template setMemory<T::value>(*ptr1); v2.template setMemory<T::value>(*ptr1);
...@@ -181,7 +200,7 @@ template<bool inte_or_lin,typename T, typename S, template<typename> class layou ...@@ -181,7 +200,7 @@ template<bool inte_or_lin,typename T, typename S, template<typename> class layou
struct unpack_selector_with_prp_lin struct unpack_selector_with_prp_lin
{ {
template<typename op, unsigned int ... prp> static int call_unpack_impl(S & recv, template<typename op, unsigned int ... prp> static int call_unpack_impl(S & recv,
openfpm::vector<BHeapMemory> & recv_buf, openfpm::vector<BMemory<HeapMemory>> & recv_buf,
openfpm::vector<size_t> * sz, openfpm::vector<size_t> * sz,
openfpm::vector<size_t> * sz_byte, openfpm::vector<size_t> * sz_byte,
op & op_param, op & op_param,
...@@ -191,7 +210,7 @@ struct unpack_selector_with_prp_lin ...@@ -191,7 +210,7 @@ struct unpack_selector_with_prp_lin
// create vector representation to a piece of memory already allocated // create vector representation to a piece of memory already allocated
openfpm::vector<typename T::value_type,PtrMemory,typename layout_base<typename T::value_type>::type,layout_base,openfpm::grow_policy_identity> v2; openfpm::vector<typename T::value_type,PtrMemory,typename layout_base<typename T::value_type>::type,layout_base,openfpm::grow_policy_identity> v2;
process_receive_mem_traits_inte<T,layout_base> prmti(v2,recv_buf,i); process_receive_mem_traits_inte<T,layout_base> prmti(v2,recv_buf,i,opt);
boost::mpl::for_each_ref<boost::mpl::range_c<int,0,T::value_type::max_prop>>(prmti); boost::mpl::for_each_ref<boost::mpl::range_c<int,0,T::value_type::max_prop>>(prmti);
...@@ -218,7 +237,7 @@ template<typename T, typename S, template<typename> class layout_base> ...@@ -218,7 +237,7 @@ template<typename T, typename S, template<typename> class layout_base>
struct unpack_selector_with_prp_lin<true,T,S,layout_base> struct unpack_selector_with_prp_lin<true,T,S,layout_base>
{ {
template<typename op, unsigned int ... prp> static int call_unpack_impl(S & recv, template<typename op, unsigned int ... prp> static int call_unpack_impl(S & recv,
openfpm::vector<BHeapMemory> & recv_buf, openfpm::vector<BMemory<HeapMemory>> & recv_buf,
openfpm::vector<size_t> * sz, openfpm::vector<size_t> * sz,
openfpm::vector<size_t> * sz_byte, openfpm::vector<size_t> * sz_byte,
op & op_param, op & op_param,
...@@ -263,7 +282,7 @@ template<typename T, typename S, template<typename> class layout_base> ...@@ -263,7 +282,7 @@ template<typename T, typename S, template<typename> class layout_base>
struct unpack_selector_with_prp<true,T,S,layout_base> struct unpack_selector_with_prp<true,T,S,layout_base>
{ {
template<typename op, unsigned int ... prp> static void call_unpack(S & recv, template<typename op, unsigned int ... prp> static void call_unpack(S & recv,
openfpm::vector<BHeapMemory> & recv_buf, openfpm::vector<BMemory<HeapMemory>> & recv_buf,
openfpm::vector<size_t> * sz, openfpm::vector<size_t> * sz,
openfpm::vector<size_t> * sz_byte, openfpm::vector<size_t> * sz_byte,
op & op_param, op & op_param,
...@@ -298,7 +317,7 @@ struct call_serialize_variadic<index_tuple<prp...>> ...@@ -298,7 +317,7 @@ struct call_serialize_variadic<index_tuple<prp...>>
template<typename op, typename T, typename S, template<typename> class layout_base> template<typename op, typename T, typename S, template<typename> class layout_base>
inline static void call_unpack(S & recv, inline static void call_unpack(S & recv,
openfpm::vector<BHeapMemory> & recv_buf, openfpm::vector<BMemory<HeapMemory>> & recv_buf,
openfpm::vector<size_t> * sz, openfpm::vector<size_t> * sz,
openfpm::vector<size_t> * sz_byte, openfpm::vector<size_t> * sz_byte,
op & op_param, op & op_param,
...@@ -487,7 +506,7 @@ struct pack_unpack_cond_with_prp ...@@ -487,7 +506,7 @@ struct pack_unpack_cond_with_prp
} }
static void unpacking(S & recv, static void unpacking(S & recv,
openfpm::vector<BHeapMemory> & recv_buf, openfpm::vector<BMemory<HeapMemory>> & recv_buf,
openfpm::vector<size_t> * sz, openfpm::vector<size_t> * sz,
openfpm::vector<size_t> * sz_byte, openfpm::vector<size_t> * sz_byte,
op & op_param, op & op_param,
......
...@@ -32,7 +32,7 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_gather) ...@@ -32,7 +32,7 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_gather)
{ {
for (size_t i = 0 ; i < 100 ; i++) for (size_t i = 0 ; i < 100 ; i++)
{ {
Vcluster & vcl = create_vcluster(); Vcluster<> & vcl = create_vcluster();
if (vcl.getProcessUnitID() == 0 && i == 0) if (vcl.getProcessUnitID() == 0 && i == 0)
std::cout << "Semantic gather test start" << std::endl; std::cout << "Semantic gather test start" << std::endl;
...@@ -72,7 +72,7 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_gather_2) ...@@ -72,7 +72,7 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_gather_2)
{ {
for (size_t i = 0 ; i < 100 ; i++) for (size_t i = 0 ; i < 100 ; i++)
{ {
Vcluster & vcl = create_vcluster(); Vcluster<> & vcl = create_vcluster();
if (vcl.getProcessingUnits() >= 32) if (vcl.getProcessingUnits() >= 32)
return; return;
...@@ -131,7 +131,7 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_gather_3) ...@@ -131,7 +131,7 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_gather_3)
{ {
for (size_t i = 0 ; i < 100 ; i++) for (size_t i = 0 ; i < 100 ; i++)
{ {
Vcluster & vcl = create_vcluster(); Vcluster<> & vcl = create_vcluster();
if (vcl.getProcessingUnits() >= 32) if (vcl.getProcessingUnits() >= 32)
{return;} {return;}
...@@ -208,7 +208,7 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_gather_4) ...@@ -208,7 +208,7 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_gather_4)
{ {
for (size_t i = 0 ; i < 100 ; i++) for (size_t i = 0 ; i < 100 ; i++)
{ {
Vcluster & vcl = create_vcluster(); Vcluster<> & vcl = create_vcluster();
if (vcl.getProcessingUnits() >= 32) if (vcl.getProcessingUnits() >= 32)
{return;} {return;}
...@@ -271,7 +271,7 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_gather_5) ...@@ -271,7 +271,7 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_gather_5)
{ {
for (size_t i = 0 ; i < 100 ; i++) for (size_t i = 0 ; i < 100 ; i++)
{ {
Vcluster & vcl = create_vcluster(); Vcluster<> & vcl = create_vcluster();
if (vcl.getProcessingUnits() >= 32) if (vcl.getProcessingUnits() >= 32)
{return;} {return;}
...@@ -338,7 +338,7 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_gather_6) ...@@ -338,7 +338,7 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_gather_6)
{ {
for (size_t i = 0 ; i < 100 ; i++) for (size_t i = 0 ; i < 100 ; i++)
{ {
Vcluster & vcl = create_vcluster(); Vcluster<> & vcl = create_vcluster();
if (vcl.getProcessingUnits() >= 32) if (vcl.getProcessingUnits() >= 32)
{return;} {return;}
...@@ -387,7 +387,7 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_gather_7) ...@@ -387,7 +387,7 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_gather_7)
{ {
for (size_t i = 0 ; i < 100 ; i++) for (size_t i = 0 ; i < 100 ; i++)
{ {
Vcluster & vcl = create_vcluster(); Vcluster<> & vcl = create_vcluster();
if (vcl.getProcessingUnits() >= 32) if (vcl.getProcessingUnits() >= 32)
{return;} {return;}
...@@ -451,7 +451,7 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_gather_8) ...@@ -451,7 +451,7 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_gather_8)
{ {
for (size_t i = 0 ; i < 100 ; i++) for (size_t i = 0 ; i < 100 ; i++)
{