DiSMEC++
|
Typedefs | |
using | WeightMatrix = Eigen::Matrix< real_t, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > |
Functions | |
std::uint32_t | read_header_length (std::streambuf &source) |
long | skip_whitespace (std::string_view source, long position) |
std::pair< std::string_view, std::string_view > | read_key_value (std::string_view source) |
This function parses a single element from a python dict literal. More... | |
io::NpyHeaderData | parse_description (std::string_view view) |
template<class T > | |
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > | load_matrix_from_npy_imp (std::streambuf &source) |
template<class T > | |
void | save_matrix_to_npy_imp (std::streambuf &target, const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > &matrix) |
Variables | |
constexpr const char | MAGIC [] = {'\x93', 'N', 'U', 'M', 'P', 'Y', '\x03', '\x00'} |
constexpr const int | MAGIC_SIZE = 6 |
constexpr const unsigned | NPY_PADDING = 64u |
using anonymous_namespace{numpy.cpp}::WeightMatrix = typedef Eigen::Matrix<real_t, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> |
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> anonymous_namespace{numpy.cpp}::load_matrix_from_npy_imp | ( | std::streambuf & | source | ) |
Definition at line 310 of file numpy.cpp.
References dismec::io::binary_load(), dismec::io::parse_npy_header(), and THROW_ERROR.
io::NpyHeaderData anonymous_namespace{numpy.cpp}::parse_description | ( | std::string_view | view | ) |
Definition at line 188 of file numpy.cpp.
References dismec::io::NpyHeaderData::Cols, dismec::io::NpyHeaderData::ColumnMajor, dismec::io::NpyHeaderData::DataType, dismec::io::parse_long(), read_key_value(), dismec::io::NpyHeaderData::Rows, and THROW_ERROR.
Referenced by dismec::io::parse_npy_header(), and TEST_CASE().
std::uint32_t anonymous_namespace{numpy.cpp}::read_header_length | ( | std::streambuf & | source | ) |
Definition at line 72 of file numpy.cpp.
References THROW_ERROR.
Referenced by dismec::io::parse_npy_header(), and TEST_CASE().
std::pair<std::string_view, std::string_view> anonymous_namespace{numpy.cpp}::read_key_value | ( | std::string_view | source | ) |
This function parses a single element from a python dict literal.
Definition at line 105 of file numpy.cpp.
References skip_whitespace(), dismec::ssize(), THROW_ERROR, and dismec::to_long().
Referenced by parse_description(), and TEST_CASE().
void anonymous_namespace{numpy.cpp}::save_matrix_to_npy_imp | ( | std::streambuf & | target, |
const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > & | matrix | ||
) |
Definition at line 330 of file numpy.cpp.
References dismec::io::binary_dump(), dismec::io::make_npy_description(), and dismec::io::write_npy_header().
long anonymous_namespace{numpy.cpp}::skip_whitespace | ( | std::string_view | source, |
long | position | ||
) |
Definition at line 96 of file numpy.cpp.
References dismec::ssize().
Referenced by read_key_value().
|
constexpr |
Definition at line 17 of file numpy.cpp.
Referenced by dismec::io::is_npy(), dismec::io::parse_npy_header(), and dismec::io::write_npy_header().
|
constexpr |
Definition at line 18 of file numpy.cpp.
Referenced by dismec::io::is_npy(), dismec::io::parse_npy_header(), and TEST_CASE().
|
constexpr |
Definition at line 19 of file numpy.cpp.
Referenced by dismec::io::write_npy_header().