NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ distributed_array() [2/3]

template<typename T >
cntr::distributed_array< T >::distributed_array ( const distributed_array< T > &  g)

Definition at line 32 of file cntr_distributed_array_impl.hpp.

32  {
33  size_t len;
34  blocksize_=g.blocksize_;
35  n_=g.n();
36  tid_=g.tid();
37  ntasks_=g.ntasks();
38  tid_map_=g.tid_map();
39  maxlen_=g.maxlen();
40  len=maxlen_*n_;
41  if(len>0){
42  data_ = new T [len];
43  memcpy(data_, g.data(), sizeof(T)*len);
44  }else{
45  data_=0;
46  }
47 }