Copyright (c) The Einsums Developers. All rights reserved. Licensed under the MIT License. See LICENSE.txt in the project root for license information.
Tensor#
This module contains code for the tensor types used in Einsums.
See the API reference of this module for more details.
Public Reference#
-
template<typename T, size_t Rank>
class Tensor# Represents a tensor. The data is stored contiguously
-
template<typename T, size_t Rank>
class TensorView# Holds a view of a
Tensor
, which may have a different rank and different dimensions.
-
template<typename T, size_t Rank>
class DeviceTensor# A tensor that makes data available to the GPU. These should be used when more permanent occupancy is desired. If you want to map/copy a tensor into GPU memory temporarily, but have it live in core most of the time, consider using a :cpp:class::DeviceTensorView<T, Rank> instead.
-
template<typename T, size_t Rank>
class DeviceTensorView# Holds a view of data that is available to the GPU. This may be a view of a
DeviceTensor
, or it may be a mapping of aTensor
orTensorView
.
-
template<typename T, size_t Rank>
class DiskTensor# A tensor whose data is stored on disk.
-
template<typename T, size_t ViewRank, size_t Rank>
class DiskView# A view of a
DiskTensor
.
-
template<typename T, size_t Rank>
class BlockTensor# A tensor that has square blocks of entries along its main diagonal. The rank must be at least 2, since rank-1 and rank-0 tensors don’t have diagonals.
-
template<typename T, size_t Rank>
class BlockDeviceTensor# Similar to
BlockTensor
, but the data is available to the GPU.
-
template<typename T, size_t Rank>
class TiledTensor# A tensor that can be split up into a grid of smaller tensors. The assumption is that most of these smaller tensors are rigorously zero, and so are not stored. This is similar to a
BlockTensor
, but the tiles do not have to lie on the diagonal, and the grid can be arbitrary on all dimensions, rather than needing to be the same across all dimensions.
-
template<typename T, size_t Rank>
class TiledTensorView# Conceptually, this is a view of a
TiledTensor
. Practically, this stores views of each of the tiles, allowing different slices to be taken from each.
-
template<typename T, size_t Rank>
class TiledDeviceTensor# Same as
TiledTensor
, but available to the GPU.
-
template<typename T, size_t Rank>
class TiledDeviceTensorView# Same as
TiledTensorView
, but available to the GPU.
-
template<typename T, size_t Rank>
class tensor_base::FunctionTensor# This is the base class for tensors which pass indices onto a different function. Users may wish to use these, so this is really the only base class that is here in the public API.
-
template<typename T, size_t Rank>
class FuncPointerTensor# This is one specialization of the
tensor_base::FunctionTensor
that wraps a function pointer, and passes arguments to that function pointer.
-
template<typename T, size_t Rank>
class FunctionTensorView# Applies an offset to the arguments passed to a function tensor. In essence, acting like a view.
-
template<typename T>
class KroneckerDelta# This is an example implementation of a function tensor that evaluates the Kronecker delta. Some may find it useful, so it is provided in the public API, rather than just being an example.
-
template<typename T>
class RuntimeTensor# This is a convenience class for interacting with the Python module. It will never work with many Einsums calls. Instead, it should be converted into a
TensorView
so that the rank can be coerced at compile time.
-
template<typename T>
class RuntimeTensorView# This is a convenience class for interacting with the Python module. It will never work with many Einsums calls. Instead, it should be converted into a
TensorView
so that the rank can be coerced at compile time.