Ginkgo  Generated from pipelines/1556235455 branch based on develop. Ginkgo version 1.9.0
A numerical linear algebra library targeting many-core architectures
Public Types | Public Member Functions | Static Public Attributes | Friends | List of all members
gko::batch_dim< Dimensionality, DimensionType > Struct Template Reference

A type representing the dimensions of a multidimensional batch object. More...

#include <ginkgo/core/base/batch_dim.hpp>

Inheritance diagram for gko::batch_dim< Dimensionality, DimensionType >:
[legend]

Public Types

using dimension_type = DimensionType
 

Public Member Functions

size_type get_num_batch_items () const
 Get the number of batch items stored. More...
 
dim< dimensionality, dimension_type > get_common_size () const
 Get the common size of the batch items. More...
 
 batch_dim ()
 The default constructor.
 
 batch_dim (const size_type num_batch_items, const dim< dimensionality, dimension_type > &common_size)
 Creates a batch_dim object which stores a uniform size for all batch entries. More...
 

Static Public Attributes

static constexpr size_type dimensionality = Dimensionality
 

Friends

bool operator== (const batch_dim &x, const batch_dim &y)
 Checks if two batch_dim objects are equal. More...
 
bool operator!= (const batch_dim< Dimensionality, DimensionType > &x, const batch_dim< Dimensionality, DimensionType > &y)
 Checks if two batch_dim objects are different. More...
 

Detailed Description

template<size_type Dimensionality = 2, typename DimensionType = size_type>
struct gko::batch_dim< Dimensionality, DimensionType >

A type representing the dimensions of a multidimensional batch object.

Template Parameters
Dimensionalitynumber of dimensions of the object
DimensionTypedatatype used to represent each dimension

Constructor & Destructor Documentation

◆ batch_dim()

template<size_type Dimensionality = 2, typename DimensionType = size_type>
gko::batch_dim< Dimensionality, DimensionType >::batch_dim ( const size_type  num_batch_items,
const dim< dimensionality, dimension_type > &  common_size 
)
inlineexplicit

Creates a batch_dim object which stores a uniform size for all batch entries.

Parameters
num_batch_itemsthe number of batch items to be stored
common_sizethe common size of all the batch items stored
Note
Use this constructor when uniform batches need to be stored.

Member Function Documentation

◆ get_common_size()

template<size_type Dimensionality = 2, typename DimensionType = size_type>
dim<dimensionality, dimension_type> gko::batch_dim< Dimensionality, DimensionType >::get_common_size ( ) const
inline

Get the common size of the batch items.

Returns
common_size

Referenced by gko::batch::BatchLinOp::get_common_size(), gko::batch::MultiVector< ValueType >::get_common_size(), and gko::transpose().

◆ get_num_batch_items()

template<size_type Dimensionality = 2, typename DimensionType = size_type>
size_type gko::batch_dim< Dimensionality, DimensionType >::get_num_batch_items ( ) const
inline

Get the number of batch items stored.

Returns
num_batch_items

Referenced by gko::batch::BatchLinOp::get_num_batch_items(), gko::batch::MultiVector< ValueType >::get_num_batch_items(), and gko::transpose().

Friends And Related Function Documentation

◆ operator!=

template<size_type Dimensionality = 2, typename DimensionType = size_type>
bool operator!= ( const batch_dim< Dimensionality, DimensionType > &  x,
const batch_dim< Dimensionality, DimensionType > &  y 
)
friend

Checks if two batch_dim objects are different.

Template Parameters
Dimensionalitynumber of dimensions of the dim objects
DimensionTypedatatype used to represent each dimension
Parameters
xfirst object
ysecond object
Returns
!(x == y)

◆ operator==

template<size_type Dimensionality = 2, typename DimensionType = size_type>
bool operator== ( const batch_dim< Dimensionality, DimensionType > &  x,
const batch_dim< Dimensionality, DimensionType > &  y 
)
friend

Checks if two batch_dim objects are equal.

Parameters
xfirst object
ysecond object
Returns
true if and only if all dimensions of both objects are equal.

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