|
NAMD
|
#include <CollectiveDeviceBuffer.h>
Public Member Functions | |
| void | allocate (CollectiveBufferType type_in, const size_t numElemsIn, SynchronousCollectiveScope scope=SynchronousCollectiveScope::all) |
| Allocates a symmetric buffer on all devices. More... | |
| void | allocate_no_check (CollectiveBufferType type_in, const size_t numElemsIn) |
| Allocates a symmetric buffer on all devices without reducing the buffer sizes. More... | |
| void | reallocate (CollectiveBufferType type_in, const size_t newNumElems, const double factor, SynchronousCollectiveScope scope=SynchronousCollectiveScope::all) |
| Reallocates a symmetric device buffer on all devices if needed. More... | |
| void | reallocate_no_check (CollectiveBufferType type_in, const size_t newNumElems, const double factor) |
| void | deallocate () |
| T *const | getDevicePtr () const |
| Returns the pointer to the device buffer. More... | |
| T **const | getDevicePeerPtr () const |
| Returns the pointer to peer's pointer on the device. More... | |
| std::vector< T * > const & | getHostPeer () const |
| Returns a host-vector containing peer's device pointers. More... | |
| CollectiveDeviceBuffer< T > & | operator= (CollectiveDeviceBuffer< T > &&other) |
| CollectiveDeviceBuffer< T > & | operator= (const CollectiveDeviceBuffer< T > &other) |
| CollectiveDeviceBuffer (const CollectiveDeviceBuffer &other) | |
| CollectiveDeviceBuffer () | |
Definition at line 25 of file CollectiveDeviceBuffer.h.
|
inline |
Definition at line 117 of file CollectiveDeviceBuffer.h.
|
inline |
Definition at line 126 of file CollectiveDeviceBuffer.h.
| void CollectiveDeviceBuffer< T >::allocate | ( | CollectiveBufferType | type_in, |
| const size_t | numElemsIn, | ||
| SynchronousCollectiveScope | scope = SynchronousCollectiveScope::all |
||
| ) |
Allocates a symmetric buffer on all devices.
This will allocate a buffer on all devices using the allocation method of the given CollectiveBufferType. The buffer will have the same size across all devices and this function will automatically compute the maximum number of elements across all master PEs.
This function can be called by either all PEs or just master PEs depending on the given scope
Definition at line 10 of file CollectiveDeviceBuffer.C.
References SynchronousCollectives::allReduce(), GlobalGPUMgr::getIsMasterPe(), GlobalGPUMgr::Object(), and SynchronousCollectives::Object().
| void CollectiveDeviceBuffer< T >::allocate_no_check | ( | CollectiveBufferType | type_in, |
| const size_t | numElemsIn | ||
| ) |
Allocates a symmetric buffer on all devices without reducing the buffer sizes.
This function will allocate a buffer on all devices, but it assumes that the number of elements given to it is the same across all master pes
Definition at line 33 of file CollectiveDeviceBuffer.C.
References SynchronousCollectives::allGather(), cudaCheck, GlobalGPUMgr::getDeviceIndex(), GlobalGPUMgr::getIsMasterPe(), GlobalGPUMgr::getNumDevices(), IPC, master, NAMD_die(), GlobalGPUMgr::Object(), SynchronousCollectives::Object(), and SingleProcess.
| void CollectiveDeviceBuffer< T >::deallocate | ( | ) |
Definition at line 145 of file CollectiveDeviceBuffer.C.
References GlobalGPUMgr::getIsMasterPe(), and GlobalGPUMgr::Object().
|
inline |
Returns the pointer to peer's pointer on the device.
Definition at line 76 of file CollectiveDeviceBuffer.h.
|
inline |
Returns the pointer to the device buffer.
Definition at line 69 of file CollectiveDeviceBuffer.h.
|
inline |
Returns a host-vector containing peer's device pointers.
Definition at line 83 of file CollectiveDeviceBuffer.h.
|
inline |
Definition at line 88 of file CollectiveDeviceBuffer.h.
|
inline |
Definition at line 106 of file CollectiveDeviceBuffer.h.
| void CollectiveDeviceBuffer< T >::reallocate | ( | CollectiveBufferType | type_in, |
| const size_t | newNumElems, | ||
| const double | factor, | ||
| SynchronousCollectiveScope | scope = SynchronousCollectiveScope::all |
||
| ) |
Reallocates a symmetric device buffer on all devices if needed.
Definition at line 100 of file CollectiveDeviceBuffer.C.
References SynchronousCollectives::allReduce(), GlobalGPUMgr::getIsMasterPe(), GlobalGPUMgr::Object(), and SynchronousCollectives::Object().
| void CollectiveDeviceBuffer< T >::reallocate_no_check | ( | CollectiveBufferType | type_in, |
| const size_t | newNumElems, | ||
| const double | factor | ||
| ) |
Definition at line 121 of file CollectiveDeviceBuffer.C.
References Empty, GlobalGPUMgr::getIsMasterPe(), NAMD_die(), and GlobalGPUMgr::Object().
1.8.14