Tpetra parallel linear algebra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Static Public Member Functions | List of all members
Tpetra::Details::Impl::ReadLine< SC, GO, isComplex > Struct Template Reference

Implementation of the readLine stand-alone function in this namespace (see below). More...

#include <Tpetra_Details_ReadTriples.hpp>

Static Public Member Functions

static int readLine (std::function< int(const GO, const GO, const SC &)> processTriple, const std::string &line, const std::size_t lineNumber, const bool tolerant=false, std::ostream *errStrm=NULL, const bool debug=false)
 Take a line from the Matrix Market file or input stream, and process the sparse matrix entry in that line. More...
 

Detailed Description

template<class SC, class GO, const bool isComplex = ::Kokkos::Details::ArithTraits<SC>::is_complex>
struct Tpetra::Details::Impl::ReadLine< SC, GO, isComplex >

Implementation of the readLine stand-alone function in this namespace (see below).

Implementations are specialized on whether or not SC is a complex-valued type.

Template Parameters
SCThe type of the value of each matrix entry.
GOThe type of each (global) index of each matrix entry.
isComplexWhether SC is a complex-valued type.

Definition at line 175 of file Tpetra_Details_ReadTriples.hpp.

Member Function Documentation

template<class SC , class GO , const bool isComplex = ::Kokkos::Details::ArithTraits<SC>::is_complex>
static int Tpetra::Details::Impl::ReadLine< SC, GO, isComplex >::readLine ( std::function< int(const GO, const GO, const SC &)>  processTriple,
const std::string &  line,
const std::size_t  lineNumber,
const bool  tolerant = false,
std::ostream *  errStrm = NULL,
const bool  debug = false 
)
static

Take a line from the Matrix Market file or input stream, and process the sparse matrix entry in that line.

Parameters
processTriple[in] Closure, generally with side effects, that takes in and stores off a sparse matrix entry. First argument is the (global) row index, second argument is the (global) column index, and third argument is the value of the entry. The closure must NOT do MPI communication. Return value is an error code, that is zero if and only if the closure succeeded.
line[in] Current line of the Matrix Market file or input stream to read.
lineNumber[in] Current line number in the file or input stream.
tolerant[in] Whether to read tolerantly.
errStrm[in] If not NULL, print any error messages to this stream.
debug[in] If true, print debug messages to *errStrm.
Returns
Error code; 0 if and only if success.

The documentation for this struct was generated from the following file: