27#include "neml2/misc/utils.h"
32class LabeledAxisAccessor;
54std::stringstream &
operator>>(std::stringstream &
in, torch::Tensor &);
56std::string join(
const std::vector<std::string> &
strs,
const std::string &
delim);
58std::vector<std::string> split(
const std::string &
str,
const std::string &
delims);
60std::string trim(
const std::string &
str,
const std::string &
white_space =
" \t\n\v\f\r");
62bool start_with(std::string_view
str, std::string_view
prefix);
64bool end_with(std::string_view
str, std::string_view
suffix);
92 for (
size_t i = 0;
i <
tokens.size();
i++)
116std::vector<std::vector<T>>
119 std::vector<std::vector<T>>
vals;
The wrapper (decorator) for cross-referencing unresolved values at parse time.
Definition CrossRef.h:54
Selection of an enum value from a list of candidates.
Definition EnumSelection.h:41
The accessor containing all the information needed to access an item in a LabeledAxis.
Definition LabeledAxisAccessor.h:58
Selection of multiple enum value from a list of candidates.
Definition MultiEnumSelection.h:41
Definition parser_utils.h:38
ParserException(std::string msg)
Definition parser_utils.h:40
const char * what() const noexcept override
Definition parser_utils.cxx:31
std::string trim(const std::string &str, const std::string &white_space)
Definition parser_utils.cxx:80
void parse_vector_(std::vector< bool > &vals, const std::string &raw_str)
Definition parser_utils.cxx:117
std::string demangle(const char *name)
Demangle a piece of cxx abi type information.
Definition utils.cxx:32
std::vector< T > parse_vector(const std::string &raw_str)
Definition parser_utils.h:98
std::vector< std::vector< T > > parse_vector_vector(const std::string &raw_str)
Definition parser_utils.h:117
std::vector< std::string > split(const std::string &str, const std::string &delims)
Definition parser_utils.cxx:59
void parse_(bool &val, const std::string &raw_str)
Definition parser_utils.cxx:104
void parse_vector_vector_(std::vector< std::vector< T > > &vals, const std::string &raw_str)
Definition parser_utils.h:107
T parse(const std::string &raw_str)
Definition parser_utils.h:79
Definition CrossRef.cxx:31
std::string name(ElasticConstant p)
Definition ElasticityConverter.cxx:30
torch::SmallVector< Size > TensorShape
Definition types.h:34
std::stringstream & operator>>(std::stringstream &ss, EnumSelection &es)
Definition EnumSelection.cxx:38