Public Member Functions | Protected Member Functions | Private Attributes
parallel_ode::ReduceStrategy Class Reference

The base strategy class. More...

#include <parallel_reduce.h>

Inheritance diagram for parallel_ode::ReduceStrategy:
Inheritance graph
[legend]

List of all members.

Public Member Functions

bool clearReduceBuffers ()
int getBodyAlignment () const
int getBodyOffsetStride () const
int getBodySize () const
int getBodySizeWithReduction () const
int getBodyStride () const
int getFinalIndex (int baseBodyIndex, int bodyOffset)
 Computes the final index for a given body index into the body reduction buffer.
virtual ReduceType getType () const
 Virtual function indicating the type of strategy.
virtual void initialize (int bodySize, int maxBodyRepetitionCount, const IntVector &batchRepetitionCount)
 Virtual function that initializes the strategy. Essentially, this is where the strides/sizes are deteremined.
void print ()
 ReduceStrategy ()
 Constructs an instance of the base strategy.
void setBodyAlignment (int bodyAlignment)
 Sets the alignment for the number of bodies, e.g., 16/32/64.
void setClearReduceBuffers (bool clearBuffers)
 Sets whether the reduction kernel should clear the reduction buffer after the reduce operation.
virtual ~ReduceStrategy ()
 Destroys the strategy.

Protected Member Functions

void setBodyOffsetStride (int bodyStride)
void setBodySize (int bodySize)
void setBodySizeWithReduction (int bodySize)
void setBodyStride (int bodyStride)

Private Attributes

bool bClearReduceBuffers_
int bodyAlignment_
int bodyOffsetStride_
int bodySize_
int bodySizeWithReduction_
int bodyStride_

Detailed Description

The base strategy class.

This class is little more than a wrapper that assists the reduction kernel in determing the stride and offsets between body reduction entries in the reduction buffer.

Definition at line 25 of file parallel_reduce.h.


Constructor & Destructor Documentation

Constructs an instance of the base strategy.

Definition at line 32 of file parallel_reduce.h.

virtual parallel_ode::ReduceStrategy::~ReduceStrategy ( ) [inline, virtual]

Destroys the strategy.

Definition at line 43 of file parallel_reduce.h.


Member Function Documentation

Definition at line 91 of file parallel_reduce.h.

Definition at line 85 of file parallel_reduce.h.

Definition at line 89 of file parallel_reduce.h.

Definition at line 86 of file parallel_reduce.h.

Definition at line 87 of file parallel_reduce.h.

Definition at line 88 of file parallel_reduce.h.

int parallel_ode::ReduceStrategy::getFinalIndex ( int  baseBodyIndex,
int  bodyOffset 
) [inline]

Computes the final index for a given body index into the body reduction buffer.

Parameters:
baseBodyIndexThe base index for the given body
bodyOffsetThe repetition number of this particular body within the batch
Returns:

Definition at line 83 of file parallel_reduce.h.

virtual ReduceType parallel_ode::ReduceStrategy::getType ( ) const [inline, virtual]

Virtual function indicating the type of strategy.

Returns:
The type of strategy

Reimplemented in parallel_ode::CompactReduceStrategy, parallel_ode::StridedReduceStrategy, and parallel_ode::SequentialReduceStrategy.

Definition at line 59 of file parallel_reduce.h.

void parallel_ode::ReduceStrategy::initialize ( int  bodySize,
int  maxBodyRepetitionCount,
const IntVector batchRepetitionCount 
) [virtual]

Virtual function that initializes the strategy. Essentially, this is where the strides/sizes are deteremined.

Parameters:
bodySizeThe number of bodies
maxBodyRepetitionCountThe maximum number of times a body is repeated for all batches
batchRepetitionCountThe maximum number of times a body is repeated in each batch

Reimplemented in parallel_ode::CompactReduceStrategy, parallel_ode::StridedReduceStrategy, and parallel_ode::SequentialReduceStrategy.

Definition at line 11 of file parallel_reduce.cpp.

Definition at line 93 of file parallel_reduce.h.

void parallel_ode::ReduceStrategy::setBodyAlignment ( int  bodyAlignment) [inline]

Sets the alignment for the number of bodies, e.g., 16/32/64.

Parameters:
bodyAlignmentThe body alignment

Definition at line 66 of file parallel_reduce.h.

void parallel_ode::ReduceStrategy::setBodyOffsetStride ( int  bodyStride) [inline, protected]

Definition at line 101 of file parallel_reduce.h.

void parallel_ode::ReduceStrategy::setBodySize ( int  bodySize) [inline, protected]

Definition at line 98 of file parallel_reduce.h.

void parallel_ode::ReduceStrategy::setBodySizeWithReduction ( int  bodySize) [inline, protected]

Definition at line 99 of file parallel_reduce.h.

void parallel_ode::ReduceStrategy::setBodyStride ( int  bodyStride) [inline, protected]

Definition at line 100 of file parallel_reduce.h.

void parallel_ode::ReduceStrategy::setClearReduceBuffers ( bool  clearBuffers) [inline]

Sets whether the reduction kernel should clear the reduction buffer after the reduce operation.

Parameters:
clearBuffersBoolean indicating whether to clear or not

Definition at line 73 of file parallel_reduce.h.


Member Data Documentation

Indicates whether the reduction kernel should zero out the reduction buffers

Definition at line 111 of file parallel_reduce.h.

# of bodies per memory aligned stride ( 128 bytes typically )

Definition at line 105 of file parallel_reduce.h.

Stride between entires for the same body in the reduction buffer

Definition at line 109 of file parallel_reduce.h.

Total # of bodies

Definition at line 106 of file parallel_reduce.h.

Total # of body reduction entries

Definition at line 107 of file parallel_reduce.h.

Stride between successive bodies in the reduction buffer

Definition at line 108 of file parallel_reduce.h.


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


parallel_quickstep
Author(s): Jared Duke
autogenerated on Fri Jan 3 2014 11:36:56