BatchLinOp Class Reference

BatchLinOp Class Reference#

Reference API: gko::batch::BatchLinOp Class Reference
Reference API
gko::batch::BatchLinOp Class Reference
Inheritance diagram for gko::batch::BatchLinOp:
[legend]

Public Member Functions

size_type get_num_batch_items () const noexcept
 
dim< 2 > get_common_size () const
 
const batch_dim< 2 > & get_size () const noexcept
 
template<typename ValueType >
void validate_application_parameters (const MultiVector< ValueType > *b, MultiVector< ValueType > *x) const
 
template<typename ValueType >
void validate_application_parameters (const MultiVector< ValueType > *alpha, const MultiVector< ValueType > *b, const MultiVector< ValueType > *beta, MultiVector< ValueType > *x) const
 
- Public Member Functions inherited from gko::EnableAbstractPolymorphicObject< BatchLinOp >
std::unique_ptr< BatchLinOp > create_default (std::shared_ptr< const Executor > exec) const
 
std::unique_ptr< BatchLinOp > create_default () const
 
std::unique_ptr< BatchLinOp > clone (std::shared_ptr< const Executor > exec) const
 
std::unique_ptr< BatchLinOp > clone () const
 
BatchLinOp * copy_from (const PolymorphicObject *other)
 
std::enable_if_t< std::is_base_of< PolymorphicObject, std::decay_t< Derived > >::value, BatchLinOp > * copy_from (std::unique_ptr< Derived > &&other)
 
std::enable_if_t< std::is_base_of< PolymorphicObject, std::decay_t< Derived > >::value, BatchLinOp > * copy_from (const std::unique_ptr< Derived > &other)
 
BatchLinOp * copy_from (const std::shared_ptr< const PolymorphicObject > &other)
 
BatchLinOp * move_from (ptr_param< PolymorphicObject > other)
 
BatchLinOp * clear ()
 
- Public Member Functions inherited from gko::PolymorphicObject
PolymorphicObjectoperator= (const PolymorphicObject &)
 
std::unique_ptr< PolymorphicObjectcreate_default (std::shared_ptr< const Executor > exec) const
 
std::unique_ptr< PolymorphicObjectcreate_default () const
 
std::unique_ptr< PolymorphicObjectclone (std::shared_ptr< const Executor > exec) const
 
std::unique_ptr< PolymorphicObjectclone () const
 
PolymorphicObjectcopy_from (const PolymorphicObject *other)
 
template<typename Derived , typename Deleter >
std::enable_if_t< std::is_base_of< PolymorphicObject, std::decay_t< Derived > >::value, PolymorphicObject > * copy_from (std::unique_ptr< Derived, Deleter > &&other)
 
template<typename Derived , typename Deleter >
std::enable_if_t< std::is_base_of< PolymorphicObject, std::decay_t< Derived > >::value, PolymorphicObject > * copy_from (const std::unique_ptr< Derived, Deleter > &other)
 
PolymorphicObjectcopy_from (const std::shared_ptr< const PolymorphicObject > &other)
 
PolymorphicObjectmove_from (ptr_param< PolymorphicObject > other)
 
PolymorphicObjectclear ()
 
std::shared_ptr< const Executorget_executor () const noexcept
 
- Public Member Functions inherited from gko::log::EnableLogging< PolymorphicObject >
void add_logger (std::shared_ptr< const Logger > logger) override
 
void remove_logger (const Logger *logger) override
 
void remove_logger (ptr_param< const Logger > logger)
 
const std::vector< std::shared_ptr< const Logger > > & get_loggers () const override
 
void clear_loggers () override
 
- Public Member Functions inherited from gko::log::Loggable
void remove_logger (ptr_param< const Logger > logger)
 

Protected Member Functions

void set_size (const batch_dim< 2 > &size)
 
 BatchLinOp (std::shared_ptr< const Executor > exec, const batch_dim< 2 > &batch_size)
 
 BatchLinOp (std::shared_ptr< const Executor > exec, const size_type num_batch_items=0, const dim< 2 > &common_size=dim< 2 >{})
 
- Protected Member Functions inherited from gko::PolymorphicObject
 PolymorphicObject (std::shared_ptr< const Executor > exec)
 
 PolymorphicObject (const PolymorphicObject &other)
 
virtual std::unique_ptr< PolymorphicObjectcreate_default_impl (std::shared_ptr< const Executor > exec) const =0
 
virtual PolymorphicObjectcopy_from_impl (const PolymorphicObject *other)=0
 
virtual PolymorphicObjectcopy_from_impl (std::unique_ptr< PolymorphicObject > other)=0
 
virtual PolymorphicObjectmove_from_impl (PolymorphicObject *other)=0
 
virtual PolymorphicObjectmove_from_impl (std::unique_ptr< PolymorphicObject > other)=0
 
virtual PolymorphicObjectclear_impl ()=0
 
- Protected Member Functions inherited from gko::log::EnableLogging< PolymorphicObject >
void log (Params &&... params) const
 

Additional Inherited Members

- Protected Attributes inherited from gko::log::EnableLogging< PolymorphicObject >
std::vector< std::shared_ptr< const Logger > > loggers_
 

Constructor & Destructor Documentation

◆ BatchLinOp() [1/2]

gko::batch::BatchLinOp::BatchLinOp ( std::shared_ptr< const Executor exec,
const batch_dim< 2 > &  batch_size 
)
inlineexplicitprotected

Creates a batch operator storing items of uniform sizes.

Parameters
execthe executor where all the operations are performed
batch_sizethe size the batched operator, as a batch_dim object

◆ BatchLinOp() [2/2]

gko::batch::BatchLinOp::BatchLinOp ( std::shared_ptr< const Executor exec,
const size_type  num_batch_items = 0,
const dim< 2 > &  common_size = dim<2>{} 
)
inlineexplicitprotected

Creates a batch operator storing items of uniform sizes.

Parameters
execthe executor where all the operations are performed
num_batch_itemsthe number of batch items to be stored in the operator
sizethe common size of the items in the batched operator

Member Function Documentation

◆ get_common_size()

dim< 2 > gko::batch::BatchLinOp::get_common_size ( ) const
inline

Returns the common size of the batch items.

Returns
the common size stored

References gko::batch_dim< Dimensionality, DimensionType >::get_common_size(), and get_size().

Referenced by validate_application_parameters(), and validate_application_parameters().

◆ get_num_batch_items()

size_type gko::batch::BatchLinOp::get_num_batch_items ( ) const
inlinenoexcept

Returns the number of items in the batch operator.

Returns
number of items in the batch operator

References gko::batch_dim< Dimensionality, DimensionType >::get_num_batch_items(), and get_size().

Referenced by validate_application_parameters(), and validate_application_parameters().

◆ get_size()

const batch_dim< 2 > & gko::batch::BatchLinOp::get_size ( ) const
inlinenoexcept

Returns the size of the batch operator.

Returns
size of the batch operator, a batch_dim object

Referenced by get_common_size(), and get_num_batch_items().

◆ set_size()

void gko::batch::BatchLinOp::set_size ( const batch_dim< 2 > &  size)
inlineprotected

Sets the size of the batch operator.

Parameters
sizeto be set

◆ validate_application_parameters() [1/2]

template<typename ValueType >
void gko::batch::BatchLinOp::validate_application_parameters ( const MultiVector< ValueType > *  alpha,
const MultiVector< ValueType > *  b,
const MultiVector< ValueType > *  beta,
MultiVector< ValueType > *  x 
) const
inline

◆ validate_application_parameters() [2/2]

template<typename ValueType >
void gko::batch::BatchLinOp::validate_application_parameters ( const MultiVector< ValueType > *  b,
MultiVector< ValueType > *  x 
) const
inline

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