STORMM Source Documentation
Loading...
Searching...
No Matches
stormm::mm::ReductionBridge Class Reference

Allocate space for reduction operations to store temporary accumulations, bridging the gap between gathering and scattering operations. More...

#include <reduction_bridge.h>

Public Member Functions

 ReductionBridge (size_t n_values)
 
size_t size () const
 Get the number of values that each of the three arrays in this object can store.
 
 ReductionBridge (const ReductionBridge &original)
 The copy and copy assignment operators must deal with pointer repair.
 
 ReductionBridge (ReductionBridge &&original)=default
 
ReductionBridgeoperator= (const ReductionBridge &original)
 
ReductionBridgeoperator= (ReductionBridge &&original)=default
 
const double * getPointer (CartesianDimension cdim, HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get pointers to one of the buffers.
 
double * getPointer (CartesianDimension cdim, HybridTargetLevel tier=HybridTargetLevel::HOST)
 

Detailed Description

Allocate space for reduction operations to store temporary accumulations, bridging the gap between gathering and scattering operations.

Constructor & Destructor Documentation

◆ ReductionBridge() [1/2]

stormm::stmath::ReductionBridge::ReductionBridge ( size_t n_values)

The constructor allocates space in all three buffers for a set amount of data.

Parameters
n_valuesThe number of intermediate values to store, most likely determined by the number of reduction work units

◆ ReductionBridge() [2/2]

stormm::stmath::ReductionBridge::ReductionBridge ( const ReductionBridge & original)

The copy and copy assignment operators must deal with pointer repair.

Parameters
originalThe original object to copy or move
otherAnother object to copy or move

Member Function Documentation

◆ getPointer()

const double * stormm::stmath::ReductionBridge::getPointer ( CartesianDimension cdim,
HybridTargetLevel tier = HybridTargetLevel::HOST ) const

Get pointers to one of the buffers.

Overloaded:

  • Get a const pointer to a const form of this object's data
  • Get a non-const pointer to a non-const form of this object's data
Parameters
cdimThe "dimension" to obtain a pointer for
tierObtain pointers to host or device data

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