LAMA
lama::_StorageIO Class Reference

This class provides static utility methods for splitting matrix storage into a local and a halo part. More...

#include <StorageIO.hpp>

Inheritance diagram for lama::_StorageIO:

Static Public Member Functions

static void writeCSRHeader (const IndexType numRows, const IndexType numValues, const File::FileType &fileType, const std::string &fileName, const PartitionId size, const PartitionId rank)
 This method writes a header file for a CSR storage.
static void readCSRHeader (IndexType &numRows, IndexType &numColumns, IndexType &numValues, PartitionId &size, PartitionId &rank, File::FileType &fileType, const std::string &fileName)
static size_t getIndexDataTypeSize (const File::IndexDataType indexDataType)

Protected Member Functions

 LAMA_LOG_DECL_STATIC_LOGGER (logger)
 logger for Storage IO

Static Private Attributes

static const int mIversion = 4

Detailed Description

This class provides static utility methods for splitting matrix storage into a local and a halo part.

Due to a column distribution the storage is divided into a local part (having the local columns) and a halo part (for the non-local columns). Furthermore, it builds the halo for exchanging the non-local values between processors.


Member Function Documentation

logger for Storage IO

void lama::_StorageIO::readCSRHeader ( IndexType numRows,
IndexType numColumns,
IndexType numValues,
PartitionId size,
PartitionId rank,
File::FileType fileType,
const std::string &  fileName 
) [static]
void lama::_StorageIO::writeCSRHeader ( const IndexType  numRows,
const IndexType  numValues,
const File::FileType fileType,
const std::string &  fileName,
const PartitionId  size,
const PartitionId  rank 
) [static]

This method writes a header file for a CSR storage.

Parameters:
[in]numRowsis number of rows of the storage
[in]numValuesis number of values of the storage
[in]fileTypespecifies the type of representation (e.g. binary)
[in]filenameis the name of the header file to write
[in]sizestands for number of partitions, is CSR storage is part of a distributed matrix
[in]rankstands for the rank of the partition.

Note: for distributed CSR matrices each partition has its own header file. #row and #non-zero values are the values for each local part.

References lama::File::BINARY, lama::File::FORMATTED, LAMA_THROWEXCEPTION, mIversion, VERSION_ID, and lama::File::XDR.


Field Documentation

const int lama::_StorageIO::mIversion = 4 [static, private]

Referenced by readCSRHeader(), and writeCSRHeader().


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