21.11
|
#include <armnn/IRuntime.hpp>
#include <armnn/Types.hpp>
#include <armnn/Logging.hpp>
#include <armnn/utility/StringUtils.hpp>
#include <armnnUtils/TContainer.hpp>
#include <iostream>
#include <fstream>
Go to the source code of this file.
Classes | |
struct | TensorPrinter |
Typedefs | |
using | QuantizationParams = std::pair< float, int32_t > |
Functions | |
std::vector< unsigned int > | ParseArray (std::istream &stream) |
std::vector< std::string > | ParseStringList (const std::string &inputString, const char *delimiter) |
Splits a given string at every accurance of delimiter into a vector of string. More... | |
void | PopulateTensorWithData (armnnUtils::TContainer &tensorData, unsigned int numElements, const std::string &dataTypeStr, const armnn::Optional< QuantizationParams > &qParams, const armnn::Optional< std::string > &dataFile) |
bool | ValidatePath (const std::string &file, const bool expectFile) |
Verifies if the given string is a valid path. More... | |
bool | ValidatePaths (const std::vector< std::string > &fileVec, const bool expectFile) |
Verifies if a given vector of strings are valid paths. More... | |
template<typename T , typename TParseElementFunc > | |
std::vector< T > | ParseArrayImpl (std::istream &stream, TParseElementFunc parseElementFunc, const char *chars="\,:") |
template<typename T , typename TParseElementFunc > | |
void | PopulateTensorWithDataGeneric (std::vector< T > &tensorData, unsigned int numElements, const armnn::Optional< std::string > &dataFile, TParseElementFunc parseFunction) |
using QuantizationParams = std::pair<float, int32_t> |
Definition at line 54 of file NetworkExecutionUtils.hpp.
std::vector<unsigned int> ParseArray | ( | std::istream & | stream | ) |
Definition at line 101 of file NetworkExecutionUtils.cpp.
References armnn::numeric_cast().
Referenced by ProgramOptions::ParseOptions().
std::vector<T> ParseArrayImpl | ( | std::istream & | stream, |
TParseElementFunc | parseElementFunc, | ||
const char * | chars = "\t ,:" |
||
) |
Definition at line 79 of file NetworkExecutionUtils.hpp.
References ARMNN_LOG, and armnn::stringUtils::StringTokenizer().
std::vector<std::string> ParseStringList | ( | const std::string & | inputString, |
const char * | delimiter | ||
) |
Splits a given string at every accurance of delimiter into a vector of string.
Definition at line 108 of file NetworkExecutionUtils.cpp.
References armnn::stringUtils::StringTrimCopy().
Referenced by GetBackendIDs(), and ProgramOptions::ParseOptions().
void PopulateTensorWithData | ( | armnnUtils::TContainer & | tensorData, |
unsigned int | numElements, | ||
const std::string & | dataTypeStr, | ||
const armnn::Optional< QuantizationParams > & | qParams, | ||
const armnn::Optional< std::string > & | dataFile | ||
) |
Definition at line 231 of file NetworkExecutionUtils.cpp.
References ARMNN_LOG, OptionalBase::has_value(), OptionalReferenceSwitch< std::is_reference< T >::value, T >::value(), and OptionalReferenceSwitch< IsReference, T >::value().
Referenced by MainImpl().
void PopulateTensorWithDataGeneric | ( | std::vector< T > & | tensorData, |
unsigned int | numElements, | ||
const armnn::Optional< std::string > & | dataFile, | ||
TParseElementFunc | parseFunction | ||
) |
Definition at line 107 of file NetworkExecutionUtils.hpp.
References OptionalBase::has_value(), and OptionalReferenceSwitch< IsReference, T >::value().
bool ValidatePath | ( | const std::string & | file, |
const bool | expectFile | ||
) |
Verifies if the given string is a valid path.
Reports invalid paths to std::err.
file | string - A string containing the path to check |
expectFile | bool - If true, checks for a regular file. |
Definition at line 300 of file NetworkExecutionUtils.cpp.
Referenced by CheckClTuningParameter(), and ValidatePaths().
bool ValidatePaths | ( | const std::vector< std::string > & | fileVec, |
const bool | expectFile | ||
) |
Verifies if a given vector of strings are valid paths.
Reports invalid paths to std::err.
fileVec | vector of string - A vector of string containing the paths to check |
expectFile | bool - If true, checks for a regular file. |
Definition at line 315 of file NetworkExecutionUtils.cpp.
References ValidatePath().
Referenced by ExecuteNetworkParams::ValidateParams().