25#include "neml2/tensors/user_tensors/LinspaceFixedDimTensor.h"
29#define LINSPACEFIXEDDIMTENSOR_REGISTER(T) register_NEML2_object_alias(Linspace##T, "Linspace" #T)
30FOR_ALL_FIXEDDIMTENSOR(LINSPACEFIXEDDIMTENSOR_REGISTER);
42 " linearly spaced on the batch dimensions. See neml2::BatchTensorBase::linspace "
43 "for a detailed explanation.";
46 options.
set(
"start").doc() =
"The starting tensor";
49 options.
set(
"end").doc() =
"The ending tensor";
52 options.
set(
"nstep").doc() =
"The number of steps with even spacing along the new dimension";
55 options.
set(
"dim").doc() =
"Where to insert the new dimension";
58 options.
set(
"batch_dim").doc() =
"Batch dimension of the output";
65 : T(T::linspace(options.get<
CrossRef<T>>(
"start"),
74#define LINSPACEFIXEDDIMTENSOR_INSTANTIATE_FIXEDDIMTENSOR(T) \
75 template class LinspaceFixedDimTensor<T>
76FOR_ALL_FIXEDDIMTENSOR(LINSPACEFIXEDDIMTENSOR_INSTANTIATE_FIXEDDIMTENSOR);
The wrapper (decorator) for cross-referencing unresolved values at parse time.
Definition CrossRef.h:52
LinspaceFixedDimTensor(const OptionSet &options)
Construct a new LinspaceFixedDimTensor object.
Definition LinspaceFixedDimTensor.cxx:64
static OptionSet expected_options()
Definition LinspaceFixedDimTensor.cxx:34
A custom map-like data structure. The keys are strings, and the values can be nonhomogeneously typed.
Definition OptionSet.h:59
const std::string & doc() const
A readonly reference to the option set's docstring.
Definition OptionSet.h:91
T & set(const std::string &)
Definition OptionSet.h:436
Definition UserTensor.h:33
static OptionSet expected_options()
Definition UserTensor.cxx:30
std::string demangle(const char *name)
Definition parser_utils.cxx:46
Definition CrossRef.cxx:32