Alexandria 2.31.0
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Classes | Namespaces | Functions | Variables
NpyCommon.h File Reference
#include "AlexandriaKernel/StringUtils.h"
#include <boost/endian/arithmetic.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/iostreams/device/mapped_file.hpp>
#include <numeric>
Include dependency graph for NpyCommon.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Euclid::NdArray::NpyDtype< T >
 
struct  Euclid::NdArray::NpyDtype< int8_t >
 
struct  Euclid::NdArray::NpyDtype< int16_t >
 
struct  Euclid::NdArray::NpyDtype< int32_t >
 
struct  Euclid::NdArray::NpyDtype< int64_t >
 
struct  Euclid::NdArray::NpyDtype< uint8_t >
 
struct  Euclid::NdArray::NpyDtype< uint16_t >
 
struct  Euclid::NdArray::NpyDtype< uint32_t >
 
struct  Euclid::NdArray::NpyDtype< uint64_t >
 
struct  Euclid::NdArray::NpyDtype< float >
 
struct  Euclid::NdArray::NpyDtype< double >
 
class  Euclid::NdArray::MappedContainer< T >
 

Namespaces

namespace  Euclid
 
namespace  Euclid::NdArray
 

Functions

void Euclid::NdArray::parseSingleValue (const std::string &descr, bool &big_endian, std::string &dtype)
 
void Euclid::NdArray::parseFieldValues (const std::string &descr, bool &big_endian, std::vector< std::string > &attrs, std::string &dtype)
 
void Euclid::NdArray::parseNpyDict (const std::string &header, bool &fortran_order, bool &big_endian, std::string &dtype, std::vector< size_t > &shape, std::vector< std::string > &attrs, size_t &n_elements)
 
void Euclid::NdArray::readNpyHeader (std::istream &input, std::string &dtype, std::vector< size_t > &shape, std::vector< std::string > &attrs, size_t &n_elements)
 
std::string Euclid::NdArray::npyShape (std::vector< size_t > shape)
 
std::string Euclid::NdArray::typeDescription (const std::string &type, const std::vector< std::string > &attrs)
 
template<typename T >
void Euclid::NdArray::writeNpyHeader (std::ostream &out, std::vector< size_t > shape, const std::vector< std::string > &attrs)
 

Variables

constexpr const char Euclid::NdArray::NPY_MAGIC [] = {'\x93', 'N', 'U', 'M', 'P', 'Y'}
 
constexpr const char * Euclid::NdArray::ENDIAN_MARKER = "<"
 
constexpr const uint8_t Euclid::NdArray::NPY_VERSION [] = {'\x02', '\x00'}