Grappa  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Utility

Namespaces

 Grappa
 this core's base pointer
 

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 374 of file common.hpp.

#define DCHECK_NULL (   val)    ;

Definition at line 381 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 112 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 105 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 386 of file common.hpp.

Function Documentation

void Grappa::IODescriptor::block_on_read ( )
inline

Definition at line 152 of file FileIO.hpp.

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

Definition at line 142 of file FileIO.hpp.

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

Definition at line 146 of file FileIO.hpp.

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

Definition at line 150 of file FileIO.hpp.

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

Definition at line 99 of file FileIO.hpp.

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

Definition at line 102 of file FileIO.hpp.

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

Definition at line 141 of file FileIO.hpp.

void Grappa::IODescriptor::handle_completion ( )
inline

Definition at line 157 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 128 of file FileIO.hpp.

size_t Grappa::IODescriptor::nbytes ( )
inline

Definition at line 147 of file FileIO.hpp.

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

Definition at line 148 of file FileIO.hpp.

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

Definition at line 149 of file FileIO.hpp.

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

make statistics printable

Definition at line 97 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 339 of file FileIO.hpp.

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

Definition at line 484 of file FileIO.hpp.

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

Definition at line 422 of file FileIO.hpp.

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

Get string containing name of type.

Definition at line 336 of file common.hpp.

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

Get string containing name of type.

Definition at line 359 of file common.hpp.

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

Definition at line 432 of file FileIO.hpp.

Variable Documentation

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

Definition at line 125 of file FileIO.hpp.

IODescriptor * Grappa::aio_completed_stack

Definition at line 100 of file Grappa.cpp.

bool Grappa::IODescriptor::complete

Definition at line 122 of file FileIO.hpp.

ConditionVariable Grappa::IODescriptor::cv

Definition at line 123 of file FileIO.hpp.

char Grappa::File::fname[FNAME_LENGTH]

Definition at line 96 of file FileIO.hpp.

bool Grappa::File::isDirectory

Definition at line 97 of file FileIO.hpp.

IODescriptor* Grappa::IODescriptor::nextCompleted

Definition at line 126 of file FileIO.hpp.

size_t Grappa::File::offset

Definition at line 98 of file FileIO.hpp.