27 #ifndef LBANN_IO_BUFFER_HPP_INCLUDED 28 #define LBANN_IO_BUFFER_HPP_INCLUDED 34 template <
typename TensorDataType>
57 : m_num_samples_fetched(0), m_fetch_data_in_background(false)
59 m_input_buffers.clear();
63 : m_num_samples_fetched(other.m_num_samples_fetched)
66 m_input_buffers.clear();
76 m_input_buffers.clear();
86 template <
class Archive>
96 m_fetch_data_in_background = flag;
120 m_data_fetch_future = std::move(future);
125 return std::move(m_data_fetch_future);
131 #endif // LBANN_IO_BUFFER_HPP_INCLUDED El::Matrix< El::Int > * get_sample_indices_fetched_per_mb()
void serialize(Archive &ar)
std::map< data_field_type, std::unique_ptr< AbsDistMatrixType > > m_input_buffers
void set_data_fetch_future(std::future< void > future)
void set_fetch_data_in_background(bool flag)
data_buffer & operator=(const data_buffer &other)
data_buffer * copy() const
El::Matrix< El::Int > m_indices_fetched_per_mb
1-D Matrix of which indices were fetched in this mini-batch
void initialize_buffer_for_data_field(data_field_type const data_field, lbann_comm *comm)
Create a data parallel distributed matrix to hold the input data for the field.
data_buffer(lbann_comm *comm)
std::atomic< bool > m_fetch_data_in_background
data_buffer(const data_buffer &other)
El::AbstractDistMatrix< TensorDataType > AbsDistMatrixType
The tensor type expected in this object.
std::string data_field_type
std::future< void > m_data_fetch_future
bool is_data_fetched_in_background() const
int m_num_samples_fetched
std::future< void > get_data_fetch_future()
const El::Matrix< El::Int > * get_sample_indices_fetched_per_mb() const