LBANN  0.103.0
LivermoreBigArtificialNeuralNetworkToolkit
tensor.hpp File Reference
#include "lbann/base.hpp"
#include "lbann/utils/dim_helpers.hpp"
#include "lbann/utils/exception.hpp"
#include "lbann/utils/typename.hpp"
#include <El/core/DistMatrix/AbstractDistMatrix.hpp>
#include <iterator>
#include <type_traits>
Include dependency graph for tensor.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  lbann::utils::details::SafeMatrixCaster< MatrixOutT, MatrixInT >
 
struct  lbann::utils::details::SafeMatrixCaster< El::Matrix< OutDataType, D >, El::AbstractMatrix< InDataType > >
 
class  lbann::utils::details::MatrixReferenceWrapper< MatrixT >
 Manage a reference to a (possibly const) matrix. More...
 
class  lbann::utils::details::MatrixAsTensorView< MatrixT >
 Interpret a matrix as a tensor. More...
 
class  lbann::utils::TensorView< T, D >
 
class  lbann::utils::ConstTensorView< T, D >
 
class  lbann::utils::DistTensorView< T, D >
 
class  lbann::utils::ConstDistTensorView< T, D >
 

Namespaces

 lbann
 
 lbann::utils
 
 lbann::utils::details
 

Functions

template<typename TDT >
void lbann::do_tensor_copy (const BaseDistMat &src, El::AbstractDistMatrix< TDT > &tgt)
 Function to efficiently select the best method for copying between two distributed tensors. Enable selection between synchronous and asynchronous copies based on tensor distribution and pre-processing macros. More...
 
template<typename TDT >
void lbann::view_or_copy_tensor (const BaseDistMat &src, El::AbstractDistMatrix< TDT > &tgt, bool locked_view=true)
 If distributed tensors have the same distribution setup the target to use a view to the source tensor, otherwise copy the src to target. More...
 
template<typename MatrixT >
std::vector< size_t > lbann::utils::details::get_tensor_dims (MatrixT const &A)
 Interpret the matrix as a tensor and return the tensor-ized dimensions. More...
 
template<typename T >
std::vector< size_t > lbann::utils::details::localize_dims (El::AbstractDistMatrix< T > const &A, std::vector< size_t > const &global_dims)
 Attempt to compute the tensor dimensions of the local portion of the matrix, given the global tensor dimensions. More...
 
template<typename MatrixOutT , typename MatrixInT >
MatrixOutT & lbann::utils::details::SafeMatrixCast (MatrixInT &in)
 
template<typename TDT >
void lbann::utils::details::do_tensor_copy_between_grids (const BaseDistMat &src, El::AbstractDistMatrix< TDT > &tgt)
 Copy between two tensors on different process grids. More...
 
template<typename TDT , El::Dist ColDist, El::Dist RowDist, El::DistWrap Wrap, El::Device Device>
void lbann::utils::details::do_tensor_copy_between_grids (const BaseDistMat &src, El::DistMatrix< TDT, ColDist, RowDist, Wrap, Device > &tgt)
 Copy between two tensors on different process grids. More...