27#include "neml2/misc/types.h"
28#include "neml2/misc/error.h"
29#include "neml2/tensors/Variable.h"
30#include "neml2/base/CrossRef.h"
51std::stringstream &
operator>>(std::stringstream &
in, torch::Tensor &);
53std::string demangle(
const char * name);
55std::vector<std::string> split(
const std::string &
str,
const std::string &
delims);
57std::string trim(
const std::string &
str,
const std::string &
white_space =
" \t\n\v\f\r");
59bool start_with(std::string_view
str, std::string_view
prefix);
61bool end_with(std::string_view
str, std::string_view
suffix);
70 if (
ss.fail() || !
ss.eof())
81 for (
size_t i = 0;
i <
tokens.size();
i++)
87std::vector<std::vector<T>>
The wrapper (decorator) for cross-referencing unresolved values at parse time.
Definition CrossRef.h:52
The accessor containing all the information needed to access an item in a LabeledAxis.
Definition LabeledAxisAccessor.h:44
Definition parser_utils.h:35
virtual const char * what() const noexcept
Definition parser_utils.cxx:31
ParserException(const std::string &msg)
Definition parser_utils.h:37
std::string trim(const std::string &str, const std::string &white_space)
Definition parser_utils.cxx:76
std::string demangle(const char *name)
Definition parser_utils.cxx:46
std::vector< T > parse_vector(const std::string &raw_str)
Definition parser_utils.h:77
std::vector< std::vector< T > > parse_vector_vector(const std::string &raw_str)
Definition parser_utils.h:88
std::vector< std::string > split(const std::string &str, const std::string &delims)
Definition parser_utils.cxx:55
T parse(const std::string &raw_str)
Definition parser_utils.h:65
Definition CrossRef.cxx:32
std::vector< TorchSize > TorchShape
Definition types.h:36
std::stringstream & operator>>(std::stringstream &, CrossRef< T > &)
Definition CrossRef.h:113