60 template <
typename DataType>
66 if (num_selected == 0) {
68 }
else if (num_selected == num_total) {
71 size_t bitset_alloc_size =
72 ((num_total + 63) / 64) *
sizeof(uint64_t) + (2 *
sizeof(
size_t));
74 size_t bitsetDataSize = (num_selected *
sizeof(DataType)) +
75 bitset_alloc_size +
sizeof(num_selected);
76 size_t offsetsDataSize = (num_selected *
sizeof(DataType)) +
77 (num_selected *
sizeof(
unsigned int)) +
78 sizeof(size_t) +
sizeof(num_selected);
80 if (bitsetDataSize < offsetsDataSize) {
Definition: DataCommMode.h:35
DataCommMode get_data_mode(size_t num_selected, size_t num_total)
Given a size of a subset of elements to send and the total number of elements, determine an appropria...
Definition: DataCommMode.h:61
Definition: DataCommMode.h:37
send no data
Definition: DataCommMode.h:34
Definition: DataCommMode.h:38
Definition: DataCommMode.h:36
DataCommMode enforcedDataMode
Specifies what format to send metadata in.
Definition: GluonSubstrate.cpp:29
DataCommMode
Enumeration of data communication modes that can be used in synchronization.
Definition: DataCommMode.h:33
Definition: DataCommMode.h:39
Definition: DataCommMode.h:40