EinsumsPy/TensorAlgebra/PyTensorAlgebra.hpp#

Defined in header EinsumsPy/TensorAlgebra/PyTensorAlgebra.hpp.

See Overview for a list of names and headers that are part of the public Einsums API.

namespace einsums
namespace tensor_algebra

Functions

std::shared_ptr<PyEinsumGenericPlan> compile_plan(std::string C_indices, std::string A_indices, std::string B_indices)#
class PyEinsumDirectProductPlan : public einsums::tensor_algebra::PyEinsumGenericPlan#

Public Functions

PyEinsumDirectProductPlan() = delete#
explicit PyEinsumDirectProductPlan(PyEinsumGenericPlan const &plan_base)#
PyEinsumDirectProductPlan(PyEinsumDirectProductPlan const&) = default#
~PyEinsumDirectProductPlan() = default#
virtual void execute(pybind11::object const &C_prefactor, pybind11::buffer &C, pybind11::object const &AB_prefactor, pybind11::buffer const &A, pybind11::buffer const &B) const override#

Execute the specified plan on the given tensors.

Private Functions

template<typename T>
inline void execute_imp(T C_prefactor, pybind11::buffer &C, T AB_prefactor, pybind11::buffer const &A, pybind11::buffer const &B) const#
class PyEinsumDotPlan : public einsums::tensor_algebra::PyEinsumGenericPlan#

Public Functions

PyEinsumDotPlan() = delete#
explicit PyEinsumDotPlan(PyEinsumGenericPlan const &plan_base)#
PyEinsumDotPlan(PyEinsumDotPlan const&) = default#
~PyEinsumDotPlan() = default#
virtual void execute(pybind11::object const &C_prefactor, pybind11::buffer &C, pybind11::object const &AB_prefactor, pybind11::buffer const &A, pybind11::buffer const &B) const override#

Execute the specified plan on the given tensors.

Private Functions

template<typename T>
inline void execute_imp(T C_prefactor, pybind11::buffer &C, T AB_prefactor, pybind11::buffer const &A, pybind11::buffer const &B) const#
class PyEinsumGemmPlan : public einsums::tensor_algebra::PyEinsumGenericPlan#

Public Functions

PyEinsumGemmPlan() = delete#
explicit PyEinsumGemmPlan(std::vector<int> const &A_link_inds, std::vector<int> const &B_link_inds, std::vector<int> const &AC_inds, std::vector<int> const &BC_inds, int A_target_last_ind, int A_link_last_ind, int B_target_last_ind, int B_link_last_ind, int CA_target_last_ind, int CB_target_last_ind, bool trans_A, bool trans_B, bool trans_C, PyEinsumGenericPlan const &plan_base)#
PyEinsumGemmPlan(PyEinsumGemmPlan const&) = default#
~PyEinsumGemmPlan() = default#
virtual void execute(pybind11::object const &C_prefactor, pybind11::buffer &C, pybind11::object const &AB_prefactor, pybind11::buffer const &A, pybind11::buffer const &B) const override#

Execute the specified plan on the given tensors.

Private Functions

template<typename T>
inline void execute_imp(T C_prefactor, pybind11::buffer &C, T AB_prefactor, pybind11::buffer const &A, pybind11::buffer const &B) const#

Private Members

std::vector<int> _AC_inds#
std::vector<int> _BC_inds#
int _A_target_last_ind#
int _B_target_last_ind#
int _CA_target_last_ind#
int _CB_target_last_ind#
bool _trans_A#
bool _trans_B#
bool _trans_C#
class PyEinsumGemvPlan : public einsums::tensor_algebra::PyEinsumGenericPlan#

Public Functions

PyEinsumGemvPlan() = delete#
explicit PyEinsumGemvPlan(std::vector<int> const &A_link_pos, std::vector<int> const &B_link_pos, std::vector<int> const &AC_pos, int A_target_last_ind, int A_link_last_ind, int B_link_last_ind, int C_target_last_ind, bool trans_A, bool swap_AB, PyEinsumGenericPlan const &plan_base)#
PyEinsumGemvPlan(PyEinsumGemvPlan const&) = default#
~PyEinsumGemvPlan() = default#
virtual void execute(pybind11::object const &C_prefactor, pybind11::buffer &C, pybind11::object const &AB_prefactor, pybind11::buffer const &A, pybind11::buffer const &B) const override#

Execute the specified plan on the given tensors.

Private Functions

template<typename T>
inline void execute_imp(T C_prefactor, pybind11::buffer &C, T AB_prefactor, pybind11::buffer const &A, pybind11::buffer const &B) const#

Private Members

std::vector<int> _AC_pos#
int _A_target_last_ind#
int _C_target_last_ind#
bool _trans_A#
bool _swap_AB#
class PyEinsumGenericPlan#
#include <PyTensorAlgebra.hpp>

Holds the info for the generic algorithm, called when all the optimizations fail.

Subclassed by einsums::tensor_algebra::PyEinsumDirectProductPlan, einsums::tensor_algebra::PyEinsumDotPlan, einsums::tensor_algebra::PyEinsumGemmPlan, einsums::tensor_algebra::PyEinsumGemvPlan, einsums::tensor_algebra::PyEinsumGerPlan

Public Functions

PyEinsumGenericPlan() = delete#
PyEinsumGenericPlan(int num_inds, std::vector<int> C_permute, std::vector<int> A_permute, std::vector<int> B_permute)#
PyEinsumGenericPlan(PyEinsumGenericPlan const&) = default#
~PyEinsumGenericPlan() = default#
virtual void execute(pybind11::object const &C_prefactor, pybind11::buffer &C, pybind11::object const &AB_prefactor, pybind11::buffer const &A, pybind11::buffer const &B) const#

Execute the specified plan on the given tensors.

Protected Functions

template<typename T>
inline void execute_generic(T C_prefactor, pybind11::buffer &C, T AB_prefactor, pybind11::buffer const &A, pybind11::buffer const &B) const#

Execute the generic algorithm.

Protected Attributes

std::vector<int> _C_permute#
std::vector<int> _A_permute#
std::vector<int> _B_permute#
int _num_inds#
bool _direct_product_swap#
class PyEinsumGerPlan : public einsums::tensor_algebra::PyEinsumGenericPlan#

Public Functions

PyEinsumGerPlan() = delete#
explicit PyEinsumGerPlan(std::vector<int> const &CA_target_pos, std::vector<int> const &CB_target_pos, bool swap_AB, PyEinsumGenericPlan const &plan_base)#
PyEinsumGerPlan(PyEinsumGerPlan const&) = default#
~PyEinsumGerPlan() = default#
virtual void execute(pybind11::object const &C_prefactor, pybind11::buffer &C, pybind11::object const &AB_prefactor, pybind11::buffer const &A, pybind11::buffer const &B) const override#

Execute the specified plan on the given tensors.

Private Functions

template<typename T>
inline void execute_imp(T C_prefactor, pybind11::buffer &C, T AB_prefactor, pybind11::buffer const &A, pybind11::buffer const &B) const#

Private Members

bool _swap_AB#
std::vector<int> _CA_target_pos#
std::vector<int> _CB_target_pos#