Galois
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
galois::runtime::NetworkIO Class Referenceabstract

Class for the network IO layer which is responsible for doing sends/receives of data. More...

#include <NetworkIO.h>

Inheritance diagram for galois::runtime::NetworkIO:
NetworkIOMPI

Classes

struct  message
 Message structure for sending data across the network. More...
 

Public Member Functions

 NetworkIO (MemUsageTracker &tracker, std::atomic< size_t > &sends, std::atomic< size_t > &recvs)
 The default constructor takes a memory usage tracker and saves it. More...
 
virtual ~NetworkIO ()
 Default destructor does nothing. More...
 
virtual void enqueue (message m)=0
 Queues a message for sending out. Takes ownership of data buffer. More...
 
virtual message dequeue ()=0
 Checks to see if a message is here for this host to receive. More...
 
virtual void progress ()=0
 Make progress. Other functions don't have to make progress. More...
 

Protected Types

using vTy = galois::PODResizeableArray< uint8_t >
 

Static Protected Member Functions

static void handleError (int rc)
 Wrapper for dealing with MPI error codes. More...
 

Protected Attributes

MemUsageTrackermemUsageTracker
 memory usage tracker More...
 
std::atomic< size_t > & inflightSends
 Number of inflight sends and receives. More...
 
std::atomic< size_t > & inflightRecvs
 

Detailed Description

Class for the network IO layer which is responsible for doing sends/receives of data.

Used by the network interface to do the actual communication.

Member Typedef Documentation

Constructor & Destructor Documentation

galois::runtime::NetworkIO::NetworkIO ( MemUsageTracker tracker,
std::atomic< size_t > &  sends,
std::atomic< size_t > &  recvs 
)
inline

The default constructor takes a memory usage tracker and saves it.

Parameters
trackerreference to a memory usage tracker used by the system
sends
recvs
galois::runtime::NetworkIO::~NetworkIO ( )
virtual

Default destructor does nothing.

Member Function Documentation

virtual message galois::runtime::NetworkIO::dequeue ( )
pure virtual

Checks to see if a message is here for this host to receive.

If so, take and return it

Returns
an empty message if no message

Implemented in NetworkIOMPI.

virtual void galois::runtime::NetworkIO::enqueue ( message  m)
pure virtual

Queues a message for sending out. Takes ownership of data buffer.

Implemented in NetworkIOMPI.

static void galois::runtime::NetworkIO::handleError ( int  rc)
inlinestaticprotected

Wrapper for dealing with MPI error codes.

Program dies if the error code isn't MPI_SUCCESS.

Parameters
rcError code to check for success
virtual void galois::runtime::NetworkIO::progress ( )
pure virtual

Make progress. Other functions don't have to make progress.

Implemented in NetworkIOMPI.

Member Data Documentation

std::atomic<size_t>& galois::runtime::NetworkIO::inflightRecvs
protected
std::atomic<size_t>& galois::runtime::NetworkIO::inflightSends
protected

Number of inflight sends and receives.

MemUsageTracker& galois::runtime::NetworkIO::memUsageTracker
protected

memory usage tracker


The documentation for this class was generated from the following files: