LAMA
|
This class provides static utility methods for splitting matrix storage into a local and a halo part. More...
#include <StorageIO.hpp>
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 |
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.
size_t lama::_StorageIO::getIndexDataTypeSize | ( | const File::IndexDataType | indexDataType | ) | [static] |
References lama::File::INT, LAMA_THROWEXCEPTION, and lama::File::LONG.
lama::_StorageIO::LAMA_LOG_DECL_STATIC_LOGGER | ( | logger | ) | [protected] |
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] |
References lama::File::BINARY, lama::File::FORMATTED, LAMA_THROWEXCEPTION, mIversion, and lama::File::XDR.
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.
[in] | numRows | is number of rows of the storage |
[in] | numValues | is number of values of the storage |
[in] | fileType | specifies the type of representation (e.g. binary) |
[in] | filename | is the name of the header file to write |
[in] | size | stands for number of partitions, is CSR storage is part of a distributed matrix |
[in] | rank | stands 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.
const int lama::_StorageIO::mIversion = 4 [static, private] |
Referenced by readCSRHeader(), and writeCSRHeader().