Gromacs  2018.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
broadcaststructs.h File Reference
#include <vector>
#include "gromacs/gmxlib/network.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/utility/smalloc.h"
+ Include dependency graph for broadcaststructs.h:

Description

Convenience wrappers for broadcasting structs.

Author
Mark Abraham mark..nosp@m.j.ab.nosp@m.raham.nosp@m.@gma.nosp@m.il.co.nosp@m.m

Functions

template<typename T >
void block_bc (const t_commrec *cr, T &data)
 Convenience wrapper for gmx_bcast of a single value.
 
template<typename T >
void nblock_bc (const t_commrec *cr, int numElements, T *data)
 Convenience wrapper for gmx_bcast of a C-style array.
 
template<typename T >
void snew_bc (const t_commrec *cr, T *&data, int numElements)
 Convenience wrapper for allocation with snew of vectors that need allocation on non-master ranks.
 
template<typename T >
static void nblock_abc (const t_commrec *cr, int numElements, T **v)
 Convenience wrapper for gmx_bcast of a C-style array which needs allocation on non-master ranks.
 
template<typename T >
static void nblock_abc (const t_commrec *cr, int numElements, std::vector< T > *v)
 Convenience wrapper for gmx_bcast of a std::vector which needs resizing on non-master ranks.