PSkel
 All Classes Files Functions
Public Member Functions | Protected Member Functions | Protected Attributes
PSkel::StencilBase< Array, Mask, Args > Class Template Reference

#include <PSkelStencil.h>

Inheritance diagram for PSkel::StencilBase< Array, Mask, Args >:
PSkel::Stencil< Array, Mask, Args > PSkel::Stencil2D< Array, Mask, Args > PSkel::Stencil3D< Array, Mask, Args >

List of all members.

Public Member Functions

void runSequential ()
void runCPU (size_t numThreads=0)
void runGPU (size_t GPUBlockSize=0)
void runTilingGPU (size_t tilingWidth, size_t tilingHeight, size_t tilingDepth, size_t GPUBlockSize=0)
void runAutoGPU (size_t GPUBlockSize=0)
void runIterativeSequential (size_t iterations)
void runIterativeCPU (size_t iterations, size_t numThreads=0)
void runIterativeGPU (size_t iterations, size_t GPUBlockSize=0)
void runIterativeTilingGPU (size_t iterations, size_t tilingWidth, size_t tilingHeight, size_t tilingDepth, size_t innerIterations=1, size_t GPUBlockSize=0)
void runIterativeAutoGPU (size_t iterations, size_t GPUBlockSize=0)

Protected Member Functions

virtual void runSeq (Array in, Array out)=0
virtual void runOpenMP (Array in, Array out, size_t numThreads)=0
void runCUDA (Array, Array, int)
void runIterativeTilingCUDA (Array in, Array out, StencilTiling< Array, Mask > tiling, size_t GPUBlockSize)

Protected Attributes

Array input
Array output
Args args
Mask mask

Detailed Description

template<class Array, class Mask, class Args = int>
class PSkel::StencilBase< Array, Mask, Args >

Class that implements the basic functionalities supported by the stencil skeletons.


Member Function Documentation

template<class Array , class Mask , class Args >
void PSkel::StencilBase< Array, Mask, Args >::runAutoGPU ( size_t  GPUBlockSize = 0)

Executes in GPU a single iteration of the stencil computation. If the data is larger than the memory available in the GPU, this function automatically selects a tiling execution of the stencil computation.

Parameters:
[in]GPUBlockSizethe block size used for the GPU processing the stencil kernel. if GPUBlockSize is 0, the block size is automatically chosen.
template<class Array , class Mask , class Args >
void PSkel::StencilBase< Array, Mask, Args >::runCPU ( size_t  numThreads = 0)

Executes in CPU, using multithreads, a single iteration of the stencil computation.

Parameters:
[in]numThreadsthe number of threads used for processing the stencil kernel. if numThreads is 0, the number of threads is automatically chosen.
template<class Array , class Mask , class Args >
void PSkel::StencilBase< Array, Mask, Args >::runGPU ( size_t  GPUBlockSize = 0)

Executes in GPU a single iteration of the stencil computation. This function does not handle data larger than the memory available in the GPU (see runAutoGPU.)

Parameters:
[in]GPUBlockSizethe block size used for the GPU processing the stencil kernel. if GPUBlockSize is 0, the block size is automatically chosen.
template<class Array , class Mask , class Args >
void PSkel::StencilBase< Array, Mask, Args >::runIterativeAutoGPU ( size_t  iterations,
size_t  GPUBlockSize = 0 
)

Executes in GPU multiple iterations of the stencil computation. At each given iteration, except the first, the previous output is used as input. If the data is larger than the memory available in the GPU, this function automatically selects a tiling execution of the stencil computation, including the number of iterations to be consecutivelly executed on GPU.

Parameters:
[in]iterationsthe number of iterations to be computed.
[in]GPUBlockSizethe block size used for the GPU processing the stencil kernel. if GPUBlockSize is 0, the block size is automatically chosen.
template<class Array , class Mask , class Args >
void PSkel::StencilBase< Array, Mask, Args >::runIterativeCPU ( size_t  iterations,
size_t  numThreads = 0 
)

Executes in CPU, using multithreads, multiple iterations of the stencil computation. At each given iteration, except the first, the previous output is used as input.

Parameters:
[in]iterationsthe number of iterations to be computed.
[in]numThreadsthe number of threads used for processing the stencil kernel. if numThreads is 0, the number of threads is automatically chosen.
template<class Array , class Mask , class Args >
void PSkel::StencilBase< Array, Mask, Args >::runIterativeGPU ( size_t  iterations,
size_t  GPUBlockSize = 0 
)

Executes in GPU multiple iterations of the stencil computation. At each given iteration, except the first, the previous output is used as input. This function does not handle data larger than the memory available in the GPU (see runIterativeAutoGPU.)

Parameters:
[in]iterationsthe number of iterations to be computed.
[in]GPUBlockSizethe block size used for the GPU processing the stencil kernel. if GPUBlockSize is 0, the block size is automatically chosen.
template<class Array , class Mask , class Args >
void PSkel::StencilBase< Array, Mask, Args >::runIterativeSequential ( size_t  iterations)

Executes sequentially in CPU multiple iterations of the stencil computation. At each given iteration, except the first, the previous output is used as input.

Parameters:
[in]iterationsthe number of iterations to be computed.
template<class Array , class Mask , class Args >
void PSkel::StencilBase< Array, Mask, Args >::runIterativeTilingGPU ( size_t  iterations,
size_t  tilingWidth,
size_t  tilingHeight,
size_t  tilingDepth,
size_t  innerIterations = 1,
size_t  GPUBlockSize = 0 
)

Executes in GPU multiple iterations of the stencil computation, tiling the input data. At each given iteration, except the first, the previous output is used as input. This function is useful for processing data larger than the memory available in the GPU (see runIterativeAutoGPU.)

Parameters:
[in]iterationsthe number of iterations to be computed.
[in]tilingWidththe width size for each (logical) tile of the input data.
[in]tilingHeightthe height size for each (logical) tile of the input data.
[in]tilingDepththe depth size for each (logical) tile of the input data.
[in]innerIterationsthe number of iterations to be consecutively executed on GPU; the number of iterations executed consecutively on increases the amount of memory required.
[in]GPUBlockSizethe block size used for the GPU processing the stencil kernel. if GPUBlockSize is 0, the block size is automatically chosen.
template<class Array , class Mask , class Args >
void PSkel::StencilBase< Array, Mask, Args >::runSequential ( )

Executes sequentially in CPU a single iteration of the stencil computation.

template<class Array , class Mask , class Args >
void PSkel::StencilBase< Array, Mask, Args >::runTilingGPU ( size_t  tilingWidth,
size_t  tilingHeight,
size_t  tilingDepth,
size_t  GPUBlockSize = 0 
)

Executes in GPU a single iteration of the stencil computation, tiling the input data. This function is useful for processing data larger than the memory available in the GPU (see runAutoGPU.)

Parameters:
[in]tilingWidththe width size for each (logical) tile of the input data.
[in]tilingHeightthe height size for each (logical) tile of the input data.
[in]tilingDepththe depth size for each (logical) tile of the input data.
[in]GPUBlockSizethe block size used for the GPU processing the stencil kernel. if GPUBlockSize is 0, the block size is automatically chosen.

The documentation for this class was generated from the following files:
 All Classes Files Functions