Grappa  r3821, hash 22cd626d567a91ead5b23302066d1e9469f45c66
Utility

Namespaces

 Grappa
 this core's base pointer
 
 Grappa::Metrics
 

Classes

class  Grappa::CallbackMetric< T >
 Metric that uses a callback to determine the value at sample time. More...
 
struct  Grappa::File
 Grappa file descriptor. More...
 
struct  Grappa::IODescriptor
 Basically a wrapper around a POSIX "struct aiocb" with info for resuming the calling Grappa thread. More...
 
class  Grappa::MaxMetric< T >
 Metric that simply keeps track of a single value over time. More...
 
class  Grappa::PoolAllocator< Base >
 
class  Grappa::PoolAllocatorInternal< Bytes, Base >
 
class  Grappa::StringMetric
 Metric that simply keeps track of a single string value over time. More...
 

Macros

#define CHECK_NULL(val)    Grappa::impl::CheckNull(__FILE__, __LINE__, "'" #val "' Must be non NULL", (val))
 
#define DCHECK_NULL(val)    ;
 
#define MPI_CHECK(mpi_call)
 
#define GRAPPA_DEFINE_METRIC(type, name, arg1)   Grappa::type name(#name, arg1)
 Define a new Grappa Metric. More...
 
#define GRAPPA_DECLARE_METRIC(type, name)   extern Grappa::type name;
 Declare a metric (defined in a separate .cpp file) so it can be used. More...
 

Functions

template<typename T >
const char * Grappa::typename_of ()
 Get string containing name of type. More...
 
template<typename T >
const char * Grappa::typename_of (const T &unused)
 Get string containing name of type. More...
 
 Grappa::File::File (const char *fname, bool asDirectory, size_t offset=0)
 
 Grappa::File::File (const char *fname, size_t offset=0)
 
 Grappa::IODescriptor::IODescriptor (int file_desc=0, size_t file_offset=0, void *buffer=NULL, size_t bufsize=0)
 
void Grappa::IODescriptor::file (int file_desc)
 
void Grappa::IODescriptor::buf (void *buf, size_t nbytes)
 
volatile void * Grappa::IODescriptor::buf ()
 
size_t Grappa::IODescriptor::nbytes ()
 
template<typename T >
size_t Grappa::IODescriptor::nelems ()
 
void Grappa::IODescriptor::offset (size_t of)
 
struct aiocb * Grappa::IODescriptor::desc_ptr ()
 
void Grappa::IODescriptor::block_on_read ()
 
void Grappa::IODescriptor::handle_completion ()
 
template<typename T >
void Grappa::read_array (File &f, GlobalAddress< T > array, size_t nelem)
 Read a file or directory of files into a global array. More...
 
template<typename T >
void Grappa::save_array (File &f, bool asDirectory, GlobalAddress< T > array, size_t nelem)
 
template<typename T >
void Grappa::write_array_unordered (std::string filename, GlobalAddress< T > array, size_t nelem)
 
template<typename T >
void Grappa::read_array_unordered (std::string filename, GlobalAddress< T > array, size_t nelem)
 
std::ostream & operator<< (std::ostream &o, const Grappa::impl::MetricBase &stat)
 make statistics printable More...
 

Variables

char Grappa::File::fname [FNAME_LENGTH]
 
bool Grappa::File::isDirectory
 
size_t Grappa::File::offset
 
struct Grappa::File Grappa::__attribute__
 
bool Grappa::IODescriptor::complete
 
ConditionVariable Grappa::IODescriptor::cv
 
struct aiocb Grappa::IODescriptor::ac
 
IODescriptor * Grappa::IODescriptor::nextCompleted
 
IODescriptorGrappa::aio_completed_stack
 

Detailed Description

Macro Definition Documentation

#define CHECK_NULL (   val)    Grappa::impl::CheckNull(__FILE__, __LINE__, "'" #val "' Must be non NULL", (val))

Definition at line 373 of file common.hpp.

#define DCHECK_NULL (   val)    ;

Definition at line 380 of file common.hpp.

#define GRAPPA_DECLARE_METRIC (   type,
  name 
)    extern Grappa::type name;

Declare a metric (defined in a separate .cpp file) so it can be used.

Parameters
typeMetric type (e.g. SummarizingMetric<double>)
nameVariable name

Definition at line 123 of file Metrics.hpp.

#define GRAPPA_DEFINE_METRIC (   type,
  name,
  arg1 
)    Grappa::type name(#name, arg1)

Define a new Grappa Metric.

Parameters
typeMetric type (e.g. SummarizingMetric<double>)
nameVariable name
arg1Default value

Definition at line 116 of file Metrics.hpp.

#define MPI_CHECK (   mpi_call)
Value:
do { \
int retval; \
if( (retval = (mpi_call)) != 0 ) { \
char error_string[MPI_MAX_ERROR_STRING]; \
int length; \
MPI_Error_string( retval, error_string, &length); \
LOG(FATAL) << "MPI call failed: " #mpi_call ": " \
<< error_string; \
} \
} while(0)

Definition at line 385 of file common.hpp.

Function Documentation

void Grappa::IODescriptor::block_on_read ( )
inline

Definition at line 163 of file FileIO.hpp.

void Grappa::IODescriptor::buf ( void *  buf,
size_t  nbytes 
)
inline

Definition at line 153 of file FileIO.hpp.

volatile void* Grappa::IODescriptor::buf ( )
inline

Definition at line 157 of file FileIO.hpp.

struct aiocb* Grappa::IODescriptor::desc_ptr ( )
inline

Definition at line 161 of file FileIO.hpp.

Grappa::File::File ( const char *  fname,
bool  asDirectory,
size_t  offset = 0 
)
inline

Definition at line 110 of file FileIO.hpp.

Grappa::File::File ( const char *  fname,
size_t  offset = 0 
)
inline

Definition at line 113 of file FileIO.hpp.

void Grappa::IODescriptor::file ( int  file_desc)
inline

Definition at line 152 of file FileIO.hpp.

void Grappa::IODescriptor::handle_completion ( )
inline

Definition at line 168 of file FileIO.hpp.

Grappa::IODescriptor::IODescriptor ( int  file_desc = 0,
size_t  file_offset = 0,
void *  buffer = NULL,
size_t  bufsize = 0 
)
inline

Definition at line 139 of file FileIO.hpp.

size_t Grappa::IODescriptor::nbytes ( )
inline

Definition at line 158 of file FileIO.hpp.

template<typename T >
size_t Grappa::IODescriptor::nelems ( )
inline

Definition at line 159 of file FileIO.hpp.

void Grappa::IODescriptor::offset ( size_t  of)
inline

Definition at line 160 of file FileIO.hpp.

std::ostream& operator<< ( std::ostream &  o,
const Grappa::impl::MetricBase &  stat 
)
inline

make statistics printable

Definition at line 108 of file Metrics.hpp.

template<typename T >
void Grappa::read_array ( File f,
GlobalAddress< T >  array,
size_t  nelem 
)

Read a file or directory of files into a global array.

Definition at line 350 of file FileIO.hpp.

template<typename T >
void Grappa::read_array_unordered ( std::string  filename,
GlobalAddress< T >  array,
size_t  nelem 
)

Definition at line 495 of file FileIO.hpp.

template<typename T >
void Grappa::save_array ( File f,
bool  asDirectory,
GlobalAddress< T >  array,
size_t  nelem 
)

Definition at line 433 of file FileIO.hpp.

template<typename T >
const char* Grappa::typename_of ( )

Get string containing name of type.

Definition at line 335 of file common.hpp.

template<typename T >
const char* Grappa::typename_of ( const T &  unused)

Get string containing name of type.

Definition at line 358 of file common.hpp.

template<typename T >
void Grappa::write_array_unordered ( std::string  filename,
GlobalAddress< T >  array,
size_t  nelem 
)

Definition at line 443 of file FileIO.hpp.

Variable Documentation

Grappa::ReuseMessageList Grappa::__attribute__
struct aiocb Grappa::IODescriptor::ac

Definition at line 136 of file FileIO.hpp.

IODescriptor * Grappa::aio_completed_stack

Definition at line 114 of file Grappa.cpp.

bool Grappa::IODescriptor::complete

Definition at line 133 of file FileIO.hpp.

ConditionVariable Grappa::IODescriptor::cv

Definition at line 134 of file FileIO.hpp.

char Grappa::File::fname[FNAME_LENGTH]

Definition at line 107 of file FileIO.hpp.

bool Grappa::File::isDirectory

Definition at line 108 of file FileIO.hpp.

IODescriptor* Grappa::IODescriptor::nextCompleted

Definition at line 137 of file FileIO.hpp.

size_t Grappa::File::offset

Definition at line 109 of file FileIO.hpp.