class t_state;
//! Convenience wrapper for gmx_bcast of a single value.
-template <typename T>
-void block_bc(const t_commrec *cr, T &data)
+template<typename T>
+void block_bc(const t_commrec* cr, T& data)
{
- gmx_bcast(sizeof(T), static_cast<void *>(&data), cr);
+ gmx_bcast(sizeof(T), static_cast<void*>(&data), cr);
}
//! Convenience wrapper for gmx_bcast of a C-style array.
-template <typename T>
-void nblock_bc(const t_commrec *cr, int numElements, T *data)
+template<typename T>
+void nblock_bc(const t_commrec* cr, int numElements, T* data)
{
- gmx_bcast(numElements * sizeof(T), static_cast<void *>(data), cr);
+ gmx_bcast(numElements * sizeof(T), static_cast<void*>(data), cr);
}
//! Convenience wrapper for gmx_bcast of an ArrayRef<T>
-template <typename T>
-void nblock_bc(const t_commrec *cr, gmx::ArrayRef<T> data)
+template<typename T>
+void nblock_bc(const t_commrec* cr, gmx::ArrayRef<T> data)
{
- gmx_bcast(data.size() * sizeof(T), static_cast<void *>(data.data()), cr);
+ gmx_bcast(data.size() * sizeof(T), static_cast<void*>(data.data()), cr);
}
//! Convenience wrapper for allocation with snew of vectors that need allocation on non-master ranks.
-template <typename T>
-void snew_bc(const t_commrec *cr, T * &data, int numElements)
+template<typename T>
+void snew_bc(const t_commrec* cr, T*& data, int numElements)
{
if (!MASTER(cr))
{
}
}
//! Convenience wrapper for gmx_bcast of a C-style array which needs allocation on non-master ranks.
-template <typename T>
-void nblock_abc(const t_commrec *cr, int numElements, T **v)
+template<typename T>
+void nblock_abc(const t_commrec* cr, int numElements, T** v)
{
snew_bc(cr, v, numElements);
nblock_bc(cr, numElements, *v);
}
//! Convenience wrapper for gmx_bcast of a std::vector which needs resizing on non-master ranks.
-template <typename T>
-void nblock_abc(const t_commrec *cr, int numElements, std::vector<T> *v)
+template<typename T>
+void nblock_abc(const t_commrec* cr, int numElements, std::vector<T>* v)
{
if (!MASTER(cr))
{
v->resize(numElements);
}
- gmx_bcast(numElements*sizeof(T), v->data(), cr);
+ gmx_bcast(numElements * sizeof(T), v->data(), cr);
}
//! \brief Broadcasts the, non-dynamic, state from the master to all ranks in cr->mpi_comm_mygroup
//
// This is intended to be used with MPI parallelization without
// domain decompostion (currently with NM and TPI).
-void broadcastStateWithoutDynamics(const t_commrec *cr, t_state *state);
+void broadcastStateWithoutDynamics(const t_commrec* cr, t_state* state);
//! \brief Broadcast inputrec and mtop and allocate node-specific settings
-void init_parallel(t_commrec *cr,
- t_inputrec *inputrec,
- gmx_mtop_t *mtop,
- PartialDeserializedTprFile *partialDeserializedTpr);
+void init_parallel(t_commrec* cr,
+ t_inputrec* inputrec,
+ gmx_mtop_t* mtop,
+ PartialDeserializedTprFile* partialDeserializedTpr);
#endif