ArmNN
 25.02
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Numpy.hpp File Reference
#include <fmt/format.h>
#include "Types.hpp"
#include "Tensor.hpp"
#include <fstream>
#include <iostream>
Include dependency graph for Numpy.hpp:

Go to the source code of this file.

Classes

struct  HeaderInfo
 from the numpy file to be parsed. More...
 
struct  Header
 from the numpy file to be parsed. More...
 

Namespaces

 armnnNumpy
 

Functions

void CreateHeaderInfo (std::ifstream &ifStream, HeaderInfo &headerInfo)
 
std::string getSubstring (std::string fullString, std::string substringStart, std::string substringEnd, bool removeStartChar=0, bool includeEndChar=0)
 Primarily used to isolate values from header dictionary. More...
 
void parseShape (Header &header, std::string &shapeString)
 
void CreateHeader (std::ifstream &ifStream, HeaderInfo &headerInfo, Header &header)
 
template<typename T >
void ReadData (std::ifstream &ifStream, T *tensor, const unsigned int &numElements)
 
armnn::DataType getArmNNDataType (std::string &descr)
 
std::string getNumpyDescr (armnn::DataType dType)
 
template<typename T >
bool compareCTypes (std::string &descr)
 
unsigned int getNumElements (Header &header)
 
template<typename T >
void WriteToNumpyFile (const std::string &outputTensorFileName, const T *const array, const unsigned int numElements, armnn::DataType dataType, const armnn::TensorShape &shape)