TiledArray  0.7.0
TiledArray::DenseShape Class Reference

Dense shape of an array. More...

#include <dense_shape.h>

Public Member Functions

DenseShape mask (const DenseShape &) const
 

Static Public Member Functions

static void collective_init (World &)
 Collective initialization of a shape. More...
 
static constexpr bool validate (const Range &)
 Validate shape range. More...
 
template<typename Index >
static constexpr bool is_zero (const Index &)
 Check that a tile is zero. More...
 
static constexpr bool is_dense ()
 Check density. More...
 
static constexpr float sparsity ()
 Sparsity fraction. More...
 
static constexpr bool empty ()
 Check if the shape is empty (uninitialized) More...
 
template<typename Index >
static DenseShape update_block (const Index &, const Index &, const DenseShape &)
 
template<typename Index >
static DenseShape block (const Index &, const Index &)
 
template<typename Index , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
static DenseShape block (const Index &, const Index &, const Scalar)
 
template<typename Index >
static DenseShape block (const Index &, const Index &, const Permutation &)
 
template<typename Index , typename Scalar >
static DenseShape block (const Index &, const Index &, const Scalar, const Permutation &)
 
static DenseShape perm (const Permutation &)
 
template<typename Scalar >
static DenseShape scale (const Scalar)
 
template<typename Scalar >
static DenseShape scale (const Scalar, const Permutation &)
 
static DenseShape add (const DenseShape &)
 
static DenseShape add (const DenseShape &, const Permutation &)
 
template<typename Scalar >
static DenseShape add (const DenseShape &, const Scalar)
 
template<typename Scalar >
static DenseShape add (const DenseShape &, const Scalar, const Permutation &)
 
template<typename Scalar >
static DenseShape add (const Scalar)
 
template<typename Scalar >
static DenseShape add (const Scalar, const Permutation &)
 
static DenseShape subt (const DenseShape &)
 
static DenseShape subt (const DenseShape &, const Permutation &)
 
template<typename Scalar >
static DenseShape subt (const DenseShape &, const Scalar)
 
template<typename Scalar >
static DenseShape subt (const DenseShape &, const Scalar, const Permutation &)
 
template<typename Scalar >
static DenseShape subt (const Scalar)
 
template<typename Scalar >
static DenseShape subt (const Scalar, const Permutation &)
 
static DenseShape mult (const DenseShape &)
 
static DenseShape mult (const DenseShape &, const Permutation &)
 
template<typename Scalar >
static DenseShape mult (const DenseShape &, const Scalar)
 
template<typename Scalar >
static DenseShape mult (const DenseShape &, const Scalar, const Permutation &)
 
template<typename Scalar >
static DenseShape gemm (const DenseShape &, const Scalar, const math::GemmHelper &)
 
template<typename Scalar >
static DenseShape gemm (const DenseShape &, const Scalar, const math::GemmHelper &, const Permutation &)
 

Detailed Description

Dense shape of an array.

Since all tiles are present in dense arrays, this shape has no data and and all checks return their logical result. The hope is that the compiler will optimize branches that use these checks.

Definition at line 54 of file dense_shape.h.

Member Function Documentation

◆ add() [1/6]

static DenseShape TiledArray::DenseShape::add ( const DenseShape )
inlinestatic

Definition at line 126 of file dense_shape.h.

◆ add() [2/6]

static DenseShape TiledArray::DenseShape::add ( const DenseShape ,
const Permutation  
)
inlinestatic

Definition at line 128 of file dense_shape.h.

◆ add() [3/6]

template<typename Scalar >
static DenseShape TiledArray::DenseShape::add ( const DenseShape ,
const Scalar   
)
inlinestatic

Definition at line 131 of file dense_shape.h.

◆ add() [4/6]

template<typename Scalar >
static DenseShape TiledArray::DenseShape::add ( const DenseShape ,
const Scalar  ,
const Permutation  
)
inlinestatic

Definition at line 134 of file dense_shape.h.

◆ add() [5/6]

template<typename Scalar >
static DenseShape TiledArray::DenseShape::add ( const Scalar  )
inlinestatic

Definition at line 137 of file dense_shape.h.

◆ add() [6/6]

template<typename Scalar >
static DenseShape TiledArray::DenseShape::add ( const Scalar  ,
const Permutation  
)
inlinestatic

Definition at line 140 of file dense_shape.h.

◆ block() [1/4]

template<typename Index >
static DenseShape TiledArray::DenseShape::block ( const Index &  ,
const Index &   
)
inlinestatic

Definition at line 103 of file dense_shape.h.

◆ block() [2/4]

template<typename Index , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
static DenseShape TiledArray::DenseShape::block ( const Index &  ,
const Index &  ,
const Scalar   
)
inlinestatic

Definition at line 107 of file dense_shape.h.

◆ block() [3/4]

template<typename Index >
static DenseShape TiledArray::DenseShape::block ( const Index &  ,
const Index &  ,
const Permutation  
)
inlinestatic

Definition at line 111 of file dense_shape.h.

◆ block() [4/4]

template<typename Index , typename Scalar >
static DenseShape TiledArray::DenseShape::block ( const Index &  ,
const Index &  ,
const Scalar  ,
const Permutation  
)
inlinestatic

Definition at line 115 of file dense_shape.h.

◆ collective_init()

static void TiledArray::DenseShape::collective_init ( World &  )
inlinestatic

Collective initialization of a shape.

No operation since there is no data.

Definition at line 63 of file dense_shape.h.

◆ empty()

static constexpr bool TiledArray::DenseShape::empty ( )
inlinestatic

Check if the shape is empty (uninitialized)

Returns
Always false

Definition at line 92 of file dense_shape.h.

◆ gemm() [1/2]

template<typename Scalar >
static DenseShape TiledArray::DenseShape::gemm ( const DenseShape ,
const Scalar  ,
const math::GemmHelper  
)
inlinestatic

Definition at line 169 of file dense_shape.h.

◆ gemm() [2/2]

template<typename Scalar >
static DenseShape TiledArray::DenseShape::gemm ( const DenseShape ,
const Scalar  ,
const math::GemmHelper ,
const Permutation  
)
inlinestatic

Definition at line 173 of file dense_shape.h.

◆ is_dense()

static constexpr bool TiledArray::DenseShape::is_dense ( )
inlinestatic

Check density.

Returns
true

Definition at line 80 of file dense_shape.h.

◆ is_zero()

template<typename Index >
static constexpr bool TiledArray::DenseShape::is_zero ( const Index &  )
inlinestatic

Check that a tile is zero.

Template Parameters
IndexThe type of the index
Returns
false

Definition at line 75 of file dense_shape.h.

◆ mask()

DenseShape TiledArray::DenseShape::mask ( const DenseShape ) const
inline

Definition at line 94 of file dense_shape.h.

◆ mult() [1/4]

static DenseShape TiledArray::DenseShape::mult ( const DenseShape )
inlinestatic

Definition at line 158 of file dense_shape.h.

◆ mult() [2/4]

static DenseShape TiledArray::DenseShape::mult ( const DenseShape ,
const Permutation  
)
inlinestatic

Definition at line 160 of file dense_shape.h.

◆ mult() [3/4]

template<typename Scalar >
static DenseShape TiledArray::DenseShape::mult ( const DenseShape ,
const Scalar   
)
inlinestatic

Definition at line 163 of file dense_shape.h.

◆ mult() [4/4]

template<typename Scalar >
static DenseShape TiledArray::DenseShape::mult ( const DenseShape ,
const Scalar  ,
const Permutation  
)
inlinestatic

Definition at line 166 of file dense_shape.h.

◆ perm()

static DenseShape TiledArray::DenseShape::perm ( const Permutation )
inlinestatic

Definition at line 118 of file dense_shape.h.

◆ scale() [1/2]

template<typename Scalar >
static DenseShape TiledArray::DenseShape::scale ( const Scalar  )
inlinestatic

Definition at line 121 of file dense_shape.h.

◆ scale() [2/2]

template<typename Scalar >
static DenseShape TiledArray::DenseShape::scale ( const Scalar  ,
const Permutation  
)
inlinestatic

Definition at line 124 of file dense_shape.h.

◆ sparsity()

static constexpr float TiledArray::DenseShape::sparsity ( )
inlinestatic

Sparsity fraction.

Returns
The fraction of tiles that are zero tiles.

Definition at line 86 of file dense_shape.h.

◆ subt() [1/6]

static DenseShape TiledArray::DenseShape::subt ( const DenseShape )
inlinestatic

Definition at line 142 of file dense_shape.h.

◆ subt() [2/6]

static DenseShape TiledArray::DenseShape::subt ( const DenseShape ,
const Permutation  
)
inlinestatic

Definition at line 144 of file dense_shape.h.

◆ subt() [3/6]

template<typename Scalar >
static DenseShape TiledArray::DenseShape::subt ( const DenseShape ,
const Scalar   
)
inlinestatic

Definition at line 147 of file dense_shape.h.

◆ subt() [4/6]

template<typename Scalar >
static DenseShape TiledArray::DenseShape::subt ( const DenseShape ,
const Scalar  ,
const Permutation  
)
inlinestatic

Definition at line 150 of file dense_shape.h.

◆ subt() [5/6]

template<typename Scalar >
static DenseShape TiledArray::DenseShape::subt ( const Scalar  )
inlinestatic

Definition at line 153 of file dense_shape.h.

◆ subt() [6/6]

template<typename Scalar >
static DenseShape TiledArray::DenseShape::subt ( const Scalar  ,
const Permutation  
)
inlinestatic

Definition at line 156 of file dense_shape.h.

◆ update_block()

template<typename Index >
static DenseShape TiledArray::DenseShape::update_block ( const Index &  ,
const Index &  ,
const DenseShape  
)
inlinestatic

Definition at line 99 of file dense_shape.h.

◆ validate()

static constexpr bool TiledArray::DenseShape::validate ( const Range )
inlinestatic

Validate shape range.

Returns
true when range matches the range of this shape

Definition at line 68 of file dense_shape.h.


The documentation for this class was generated from the following file: