27#include "neml2/misc/utils.h"
32class LabeledAxisAccessor;
52std::stringstream &
operator>>(std::stringstream &
in, torch::Tensor &);
54std::vector<std::string> split(
const std::string &
str,
const std::string &
delims);
56std::string trim(
const std::string &
str,
const std::string &
white_space =
" \t\n\v\f\r");
58bool start_with(std::string_view
str, std::string_view
prefix);
60bool end_with(std::string_view
str, std::string_view
suffix);
68 if (
ss.fail() || !
ss.eof())
88 for (
size_t i = 0;
i <
tokens.size();
i++)
112std::vector<std::vector<T>>
115 std::vector<std::vector<T>>
vals;
The wrapper (decorator) for cross-referencing unresolved values at parse time.
Definition CrossRef.h:56
The accessor containing all the information needed to access an item in a LabeledAxis.
Definition LabeledAxisAccessor.h:47
Definition parser_utils.h:36
virtual const char * what() const noexcept
Definition parser_utils.cxx:31
ParserException(const std::string &msg)
Definition parser_utils.h:38
std::string trim(const std::string &str, const std::string &white_space)
Definition parser_utils.cxx:67
void parse_vector_(std::vector< bool > &vals, const std::string &raw_str)
Definition parser_utils.cxx:104
std::string demangle(const char *name)
Demangle a piece of cxx abi type information.
Definition utils.cxx:33
std::vector< T > parse_vector(const std::string &raw_str)
Definition parser_utils.h:94
std::vector< std::vector< T > > parse_vector_vector(const std::string &raw_str)
Definition parser_utils.h:113
std::vector< std::string > split(const std::string &str, const std::string &delims)
Definition parser_utils.cxx:46
void parse_(bool &val, const std::string &raw_str)
Definition parser_utils.cxx:91
void parse_vector_vector_(std::vector< std::vector< T > > &vals, const std::string &raw_str)
Definition parser_utils.h:103
T parse(const std::string &raw_str)
Definition parser_utils.h:75
Definition CrossRef.cxx:30
torch::SmallVector< Size > TensorShape
Definition types.h:34
std::stringstream & operator>>(std::stringstream &ss, EnumSelection &es)
Definition EnumSelection.cxx:38