Class PythonEinsumGeneratorContext¶
Defined in File python_einsum.hpp
Inheritance Relationships¶
Base Type¶
public sequant::ReorderingContext(Class ReorderingContext)
Derived Types¶
public sequant::NumPyEinsumGeneratorContext(Class NumPyEinsumGeneratorContext)public sequant::PyTorchEinsumGeneratorContext(Class PyTorchEinsumGeneratorContext)
Class Documentation¶
-
class PythonEinsumGeneratorContext : public sequant::ReorderingContext¶
Base context class for Python einsum generators.
Subclassed by sequant::NumPyEinsumGeneratorContext, sequant::PyTorchEinsumGeneratorContext
Public Types
-
using ShapeMap = std::map<IndexSpace, std::string>¶
-
using TagMap = std::map<IndexSpace, std::string>¶
Public Functions
-
inline PythonEinsumGeneratorContext()¶
-
~PythonEinsumGeneratorContext() = default¶
-
inline bool generate_imports() const¶
Get whether to generate import statements.
-
inline void set_generate_imports(bool value)¶
Set whether to generate import statements.
-
inline std::string get_shape(const IndexSpace &space) const¶
Get the dimension/shape for a given index space.
-
inline void set_shape(const IndexSpace &space, std::string shape)¶
Set the dimension/shape for a given index space.
-
inline std::string get_tag(const IndexSpace &space) const¶
Get the tag for a given index space Tags are appended to tensor names to distinguish different blocks
-
inline void set_tag(const IndexSpace &space, std::string tag)¶
Set the tag for a given index space.
-
using ShapeMap = std::map<IndexSpace, std::string>¶