Documentation

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 53 of file dense_shape.h.

Public Types

using index1_type = TA_1INDEX_TYPE
 
using value_type = float
 

Public Member Functions

 DenseShape ()=default
 
 DenseShape (const DenseShape &)=default
 
 DenseShape (DenseShape &&)=default
 
DenseShapeoperator= (const DenseShape &)=default
 
DenseShapeoperator= (DenseShape &&)=default
 
 ~DenseShape ()=default
 
template<typename Real >
 DenseShape (Real &&, const TiledRange &)
 
DenseShape mask (const DenseShape &) const
 
template<typename PairRange , typename = std::enable_if_t<detail::is_gpair_range_v<PairRange>>>
DenseShape update_block (const PairRange &bounds, const DenseShape &other) const
 
template<typename PairRange , typename = std::enable_if_t<detail::is_gpair_range_v<PairRange>>>
DenseShape block (const PairRange &bounds) const
 
template<typename PairRange , typename Scalar , typename = std::enable_if_t<detail::is_gpair_range_v<PairRange> && detail::is_numeric_v<Scalar>>>
DenseShape block (const PairRange &bounds, const Scalar) const
 
template<typename PairRange , typename = std::enable_if_t<detail::is_gpair_range_v<PairRange>>>
DenseShape block (const PairRange &bounds, const Permutation &) const
 
template<typename PairRange , typename Scalar , typename = std::enable_if_t<detail::is_gpair_range_v<PairRange> && detail::is_numeric_v<Scalar>>>
DenseShape block (const PairRange &bounds, const Scalar, const Permutation &) const
 
template<typename Archive >
void serialize (const Archive &ar) 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 value_type threshold ()
 Threshold accessor. More...
 
static void threshold (const value_type thresh)
 Set threshold to thresh. More...
 
static constexpr bool empty ()
 Check if the shape is empty (uninitialized) More...
 
template<typename Index1 , typename Index2 , typename = std::enable_if_t<detail::is_integral_range_v<Index1> && detail::is_integral_range_v<Index2>>>
static DenseShape update_block (const Index1 &, const Index2 &, const DenseShape &)
 
template<typename Index1 , typename Index2 , typename = std::enable_if_t<std::is_integral_v<Index1> && std::is_integral_v<Index2>>>
static DenseShape update_block (const std::initializer_list< Index1 > &, const std::initializer_list< Index2 > &, const DenseShape &)
 
template<typename Index , typename = std::enable_if_t<std::is_integral_v<Index>>>
static DenseShape update_block (const std::initializer_list< std::initializer_list< Index >> &, const DenseShape &)
 
template<typename Index1 , typename Index2 , typename = std::enable_if_t<detail::is_integral_range_v<Index1> && detail::is_integral_range_v<Index2>>>
static DenseShape block (const Index1 &, const Index2 &)
 
template<typename Index1 , typename Index2 , typename = std::enable_if_t<std::is_integral_v<Index1> && std::is_integral_v<Index2>>>
static DenseShape block (const std::initializer_list< Index1 > &, const std::initializer_list< Index2 > &)
 
template<typename Index , typename = std::enable_if_t<std::is_integral_v<Index>>>
static DenseShape block (const std::initializer_list< std::initializer_list< Index >> &)
 
template<typename Index1 , typename Index2 , typename Scalar , typename = std::enable_if_t<detail::is_integral_range_v<Index1> && detail::is_integral_range_v<Index2> && detail::is_numeric_v<Scalar>>>
static DenseShape block (const Index1 &, const Index2 &, const Scalar)
 
template<typename Index1 , typename Index2 , typename Scalar , typename = std::enable_if_t<std::is_integral_v<Index1> && std::is_integral_v<Index2> && detail::is_numeric_v<Scalar>>>
static DenseShape block (const std::initializer_list< Index1 > &, const std::initializer_list< Index2 > &, const Scalar)
 
template<typename Index , typename Scalar , typename = std::enable_if_t<std::is_integral_v<Index> && detail::is_numeric_v<Scalar>>>
static DenseShape block (const std::initializer_list< std::initializer_list< Index >> &, const Scalar)
 
template<typename Index1 , typename Index2 , typename = std::enable_if_t<detail::is_integral_range_v<Index1> && detail::is_integral_range_v<Index2>>>
static DenseShape block (const Index1 &, const Index2 &, const Permutation &)
 
template<typename Index1 , typename Index2 , typename = std::enable_if_t<std::is_integral_v<Index1> && std::is_integral_v<Index2>>>
static DenseShape block (const std::initializer_list< Index1 > &, const std::initializer_list< Index2 > &, const Permutation &)
 
template<typename Index , typename = std::enable_if_t<std::is_integral_v<Index>>>
static DenseShape block (const std::initializer_list< std::initializer_list< Index >> &, const Permutation &)
 
template<typename Index1 , typename Index2 , typename Scalar , typename = std::enable_if_t<detail::is_integral_range_v<Index1> && detail::is_integral_range_v<Index2> && detail::is_numeric_v<Scalar>>>
static DenseShape block (const Index1 &, const Index2 &, const Scalar, const Permutation &)
 
template<typename Index1 , typename Index2 , typename Scalar , typename = std::enable_if_t<std::is_integral_v<Index1> && std::is_integral_v<Index2> && detail::is_numeric_v<Scalar>>>
static DenseShape block (const std::initializer_list< Index1 > &, const std::initializer_list< Index2 > &, const Scalar, const Permutation &)
 
template<typename Index , typename Scalar , typename = std::enable_if_t<std::is_integral_v<Index> && detail::is_numeric_v<Scalar>>>
static DenseShape block (const std::initializer_list< std::initializer_list< 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 &)
 

Member Typedef Documentation

◆ index1_type

using TiledArray::DenseShape::index1_type = TA_1INDEX_TYPE

Definition at line 55 of file dense_shape.h.

◆ value_type

Definition at line 56 of file dense_shape.h.

Constructor & Destructor Documentation

◆ DenseShape() [1/4]

TiledArray::DenseShape::DenseShape ( )
default
Here is the caller graph for this function:

◆ DenseShape() [2/4]

TiledArray::DenseShape::DenseShape ( const DenseShape )
default

◆ DenseShape() [3/4]

TiledArray::DenseShape::DenseShape ( DenseShape &&  )
default

◆ ~DenseShape()

TiledArray::DenseShape::~DenseShape ( )
default

◆ DenseShape() [4/4]

template<typename Real >
TiledArray::DenseShape::DenseShape ( Real &&  ,
const TiledRange  
)
inline

Definition at line 71 of file dense_shape.h.

Member Function Documentation

◆ add() [1/6]

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

Definition at line 290 of file dense_shape.h.

Here is the call graph for this function:

◆ add() [2/6]

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

Definition at line 292 of file dense_shape.h.

Here is the call graph for this function:

◆ add() [3/6]

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

Definition at line 297 of file dense_shape.h.

Here is the call graph for this function:

◆ add() [4/6]

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

Definition at line 302 of file dense_shape.h.

Here is the call graph for this function:

◆ add() [5/6]

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

Definition at line 307 of file dense_shape.h.

Here is the call graph for this function:

◆ add() [6/6]

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

Definition at line 312 of file dense_shape.h.

Here is the call graph for this function:

◆ block() [1/16]

template<typename Index1 , typename Index2 , typename = std::enable_if_t<detail::is_integral_range_v<Index1> && detail::is_integral_range_v<Index2>>>
static DenseShape TiledArray::DenseShape::block ( const Index1 &  ,
const Index2 &   
)
inlinestatic

Definition at line 154 of file dense_shape.h.

Here is the call graph for this function:

◆ block() [2/16]

template<typename Index1 , typename Index2 , typename = std::enable_if_t<detail::is_integral_range_v<Index1> && detail::is_integral_range_v<Index2>>>
static DenseShape TiledArray::DenseShape::block ( const Index1 &  ,
const Index2 &  ,
const Permutation  
)
inlinestatic

Definition at line 215 of file dense_shape.h.

Here is the call graph for this function:

◆ block() [3/16]

template<typename Index1 , typename Index2 , typename Scalar , typename = std::enable_if_t<detail::is_integral_range_v<Index1> && detail::is_integral_range_v<Index2> && detail::is_numeric_v<Scalar>>>
static DenseShape TiledArray::DenseShape::block ( const Index1 &  ,
const Index2 &  ,
const  Scalar 
)
inlinestatic

Definition at line 183 of file dense_shape.h.

Here is the call graph for this function:

◆ block() [4/16]

template<typename Index1 , typename Index2 , typename Scalar , typename = std::enable_if_t<detail::is_integral_range_v<Index1> && detail::is_integral_range_v<Index2> && detail::is_numeric_v<Scalar>>>
static DenseShape TiledArray::DenseShape::block ( const Index1 &  ,
const Index2 &  ,
const  Scalar,
const Permutation  
)
inlinestatic

Definition at line 246 of file dense_shape.h.

Here is the call graph for this function:

◆ block() [5/16]

template<typename PairRange , typename = std::enable_if_t<detail::is_gpair_range_v<PairRange>>>
DenseShape TiledArray::DenseShape::block ( const PairRange &  bounds) const
inline

Definition at line 168 of file dense_shape.h.

Here is the call graph for this function:

◆ block() [6/16]

template<typename PairRange , typename = std::enable_if_t<detail::is_gpair_range_v<PairRange>>>
DenseShape TiledArray::DenseShape::block ( const PairRange &  bounds,
const Permutation  
) const
inline

Definition at line 230 of file dense_shape.h.

Here is the call graph for this function:

◆ block() [7/16]

template<typename PairRange , typename Scalar , typename = std::enable_if_t<detail::is_gpair_range_v<PairRange> && detail::is_numeric_v<Scalar>>>
DenseShape TiledArray::DenseShape::block ( const PairRange &  bounds,
const  Scalar 
) const
inline

Definition at line 199 of file dense_shape.h.

Here is the call graph for this function:

◆ block() [8/16]

template<typename PairRange , typename Scalar , typename = std::enable_if_t<detail::is_gpair_range_v<PairRange> && detail::is_numeric_v<Scalar>>>
DenseShape TiledArray::DenseShape::block ( const PairRange &  bounds,
const  Scalar,
const Permutation  
) const
inline

Definition at line 264 of file dense_shape.h.

Here is the call graph for this function:

◆ block() [9/16]

template<typename Index1 , typename Index2 , typename = std::enable_if_t<std::is_integral_v<Index1> && std::is_integral_v<Index2>>>
static DenseShape TiledArray::DenseShape::block ( const std::initializer_list< Index1 > &  ,
const std::initializer_list< Index2 > &   
)
inlinestatic

Definition at line 161 of file dense_shape.h.

Here is the call graph for this function:

◆ block() [10/16]

template<typename Index1 , typename Index2 , typename = std::enable_if_t<std::is_integral_v<Index1> && std::is_integral_v<Index2>>>
static DenseShape TiledArray::DenseShape::block ( const std::initializer_list< Index1 > &  ,
const std::initializer_list< Index2 > &  ,
const Permutation  
)
inlinestatic

Definition at line 222 of file dense_shape.h.

Here is the call graph for this function:

◆ block() [11/16]

template<typename Index1 , typename Index2 , typename Scalar , typename = std::enable_if_t<std::is_integral_v<Index1> && std::is_integral_v<Index2> && detail::is_numeric_v<Scalar>>>
static DenseShape TiledArray::DenseShape::block ( const std::initializer_list< Index1 > &  ,
const std::initializer_list< Index2 > &  ,
const  Scalar 
)
inlinestatic

Definition at line 191 of file dense_shape.h.

Here is the call graph for this function:

◆ block() [12/16]

template<typename Index1 , typename Index2 , typename Scalar , typename = std::enable_if_t<std::is_integral_v<Index1> && std::is_integral_v<Index2> && detail::is_numeric_v<Scalar>>>
static DenseShape TiledArray::DenseShape::block ( const std::initializer_list< Index1 > &  ,
const std::initializer_list< Index2 > &  ,
const  Scalar,
const Permutation  
)
inlinestatic

Definition at line 255 of file dense_shape.h.

Here is the call graph for this function:

◆ block() [13/16]

template<typename Index , typename = std::enable_if_t<std::is_integral_v<Index>>>
static DenseShape TiledArray::DenseShape::block ( const std::initializer_list< std::initializer_list< Index >> &  )
inlinestatic

Definition at line 174 of file dense_shape.h.

Here is the call graph for this function:

◆ block() [14/16]

template<typename Index , typename = std::enable_if_t<std::is_integral_v<Index>>>
static DenseShape TiledArray::DenseShape::block ( const std::initializer_list< std::initializer_list< Index >> &  ,
const Permutation  
)
inlinestatic

Definition at line 236 of file dense_shape.h.

Here is the call graph for this function:

◆ block() [15/16]

template<typename Index , typename Scalar , typename = std::enable_if_t<std::is_integral_v<Index> && detail::is_numeric_v<Scalar>>>
static DenseShape TiledArray::DenseShape::block ( const std::initializer_list< std::initializer_list< Index >> &  ,
const  Scalar 
)
inlinestatic

Definition at line 206 of file dense_shape.h.

Here is the call graph for this function:

◆ block() [16/16]

template<typename Index , typename Scalar , typename = std::enable_if_t<std::is_integral_v<Index> && detail::is_numeric_v<Scalar>>>
static DenseShape TiledArray::DenseShape::block ( const std::initializer_list< std::initializer_list< Index >> &  ,
const  Scalar,
const Permutation  
)
inlinestatic

Definition at line 272 of file dense_shape.h.

Here is the call graph for this function:

◆ 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 76 of file dense_shape.h.

◆ empty()

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

Check if the shape is empty (uninitialized)

Returns
Always false

Definition at line 115 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 359 of file dense_shape.h.

Here is the call graph for this function:

◆ gemm() [2/2]

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

Definition at line 365 of file dense_shape.h.

Here is the call graph for this function:

◆ is_dense()

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

Check density.

Returns
true

Definition at line 95 of file dense_shape.h.

◆ is_zero()

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

Check that a tile is zero.

Template Parameters
IndexThe type of the index
Returns
false

Definition at line 88 of file dense_shape.h.

◆ mask()

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

Definition at line 117 of file dense_shape.h.

◆ mult() [1/4]

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

Definition at line 342 of file dense_shape.h.

Here is the call graph for this function:

◆ mult() [2/4]

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

Definition at line 344 of file dense_shape.h.

Here is the call graph for this function:

◆ mult() [3/4]

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

Definition at line 349 of file dense_shape.h.

Here is the call graph for this function:

◆ mult() [4/4]

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

Definition at line 354 of file dense_shape.h.

Here is the call graph for this function:

◆ operator=() [1/2]

DenseShape& TiledArray::DenseShape::operator= ( const DenseShape )
default

◆ operator=() [2/2]

DenseShape& TiledArray::DenseShape::operator= ( DenseShape &&  )
default

◆ perm()

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

Definition at line 278 of file dense_shape.h.

Here is the call graph for this function:

◆ scale() [1/2]

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

Definition at line 281 of file dense_shape.h.

Here is the call graph for this function:

◆ scale() [2/2]

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

Definition at line 286 of file dense_shape.h.

Here is the call graph for this function:

◆ serialize()

template<typename Archive >
void TiledArray::DenseShape::serialize ( const Archive &  ar) const
inline

Definition at line 371 of file dense_shape.h.

◆ sparsity()

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

Sparsity fraction.

Returns
The fraction of tiles that are zero tiles.

Definition at line 100 of file dense_shape.h.

◆ subt() [1/6]

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

Definition at line 316 of file dense_shape.h.

Here is the call graph for this function:

◆ subt() [2/6]

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

Definition at line 318 of file dense_shape.h.

Here is the call graph for this function:

◆ subt() [3/6]

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

Definition at line 323 of file dense_shape.h.

Here is the call graph for this function:

◆ subt() [4/6]

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

Definition at line 328 of file dense_shape.h.

Here is the call graph for this function:

◆ subt() [5/6]

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

Definition at line 333 of file dense_shape.h.

Here is the call graph for this function:

◆ subt() [6/6]

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

Definition at line 338 of file dense_shape.h.

Here is the call graph for this function:

◆ threshold() [1/2]

static value_type TiledArray::DenseShape::threshold ( )
inlinestatic

Threshold accessor.

Returns
The current threshold

Definition at line 105 of file dense_shape.h.

◆ threshold() [2/2]

static void TiledArray::DenseShape::threshold ( const value_type  thresh)
inlinestatic

Set threshold to thresh.

Parameters
threshThe new threshold

Definition at line 110 of file dense_shape.h.

◆ update_block() [1/4]

template<typename Index1 , typename Index2 , typename = std::enable_if_t<detail::is_integral_range_v<Index1> && detail::is_integral_range_v<Index2>>>
static DenseShape TiledArray::DenseShape::update_block ( const Index1 &  ,
const Index2 &  ,
const DenseShape  
)
inlinestatic

Definition at line 122 of file dense_shape.h.

Here is the call graph for this function:

◆ update_block() [2/4]

template<typename PairRange , typename = std::enable_if_t<detail::is_gpair_range_v<PairRange>>>
DenseShape TiledArray::DenseShape::update_block ( const PairRange &  bounds,
const DenseShape other 
) const
inline

Definition at line 138 of file dense_shape.h.

Here is the call graph for this function:

◆ update_block() [3/4]

template<typename Index1 , typename Index2 , typename = std::enable_if_t<std::is_integral_v<Index1> && std::is_integral_v<Index2>>>
static DenseShape TiledArray::DenseShape::update_block ( const std::initializer_list< Index1 > &  ,
const std::initializer_list< Index2 > &  ,
const DenseShape  
)
inlinestatic

Definition at line 130 of file dense_shape.h.

Here is the call graph for this function:

◆ update_block() [4/4]

template<typename Index , typename = std::enable_if_t<std::is_integral_v<Index>>>
static DenseShape TiledArray::DenseShape::update_block ( const std::initializer_list< std::initializer_list< Index >> &  ,
const DenseShape  
)
inlinestatic

Definition at line 145 of file dense_shape.h.

Here is the call graph for this function:

◆ validate()

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

Validate shape range.

Returns
true when range matches the range of this shape

Definition at line 81 of file dense_shape.h.


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