NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ Reduce_timestep() [6/7]

template<typename T >
void cntr::Reduce_timestep ( int  tstp,
int  root,
herm_matrix_timestep_view< T > &  Gred,
herm_matrix< T > &  G 
)

MPI reduce for the herm_matrix to a herm_matrix_timestep_view

Purpose

MPI reduce for the herm_matrix to a herm_matrix_timestep_view on rank root. Works for scalar or square-matrix contour objects.

Parameters
tstp

time step

root

Index of root

Gred

The reduced herm_matrix_timestep_view on rank root.

G

The herm_matrix on the individual ranks.

Definition at line 272 of file cntr_mpitools_impl.hpp.

References cntr::herm_matrix< T >::nt(), cntr::herm_matrix_timestep_view< T >::ntau(), cntr::herm_matrix< T >::ntau(), Reduce_timestep(), cntr::herm_matrix_timestep_view< T >::size1(), cntr::herm_matrix< T >::size1(), cntr::herm_matrix_timestep_view< T >::size2(), cntr::herm_matrix< T >::size2(), and cntr::herm_matrix_timestep_view< T >::tstp().

273  {
274  assert(tstp <= G.nt());
275  int taskid;
276  MPI_Comm_rank(MPI_COMM_WORLD, &taskid);
277  if (taskid == root) {
278  assert(tstp == Gred.tstp());
279  assert(G.ntau() == Gred.ntau());
280  assert(G.size1() == Gred.size1());
281  assert(G.size2() == Gred.size2());
282  }
283 
284  herm_matrix_timestep_view<T> Gtemp(tstp, G);
285  Reduce_timestep(tstp, root, Gred, Gtemp);
286 
287 }
void Reduce_timestep(int tstp, int root, herm_matrix_timestep< T > &Gred, herm_matrix_timestep< T > &G)
MPI reduce for the herm_matrix_timestep to a herm_matrix_timestep
+ Here is the call graph for this function: