ASL  0.1.6
Advanced Simulation Library
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | Related Functions | List of all members

OpenCl Kernel generator. More...

#include <aclKernel.h>

Inheritance diagram for acl::Kernel:
acl::ExpressionContainer acl::ExpressionContainer

Public Member Functions

 Kernel (const KernelConfiguration kernelConfig_=KERNEL_BASIC)
 
void setup ()
 
void compute ()
 
void setGroupsNumber (unsigned int n)
 
unsigned int getGroupsNumber ()
 
std::string getKernelSource ()
 
unsigned int getKernelID ()
 
const cl::KernelgetKernel () const
 
void clear ()
 removes all expressions from the kernel More...
 
const KernelConfigurationgetConfiguration () const
 
 Kernel (const KernelConfiguration kernelConfig_=KERNEL_BASIC)
 
void setup ()
 
void compute ()
 
void setGroupsNumber (unsigned int n)
 
unsigned int getGroupsNumber ()
 
std::string getKernelSource ()
 
unsigned int getKernelID ()
 
const cl::KernelgetKernel () const
 
void clear ()
 removes all expressions from the kernel More...
 
const KernelConfigurationgetConfiguration () const
 
- Public Member Functions inherited from acl::ExpressionContainer
 ExpressionContainer ()
 
void addExpression (Element expression_)
 
unsigned int getSize ()
 
const CommandQueue getQueue () const
 
 ExpressionContainer ()
 
void addExpression (Element expression_)
 
unsigned int getSize ()
 
const CommandQueue getQueue () const
 

Protected Member Functions

cl_uint detectVectorWidth ()
 detects minimal vector width of all available types of Elements More...
 
void generateExtensions ()
 
void generateArguments ()
 
void generateIndex ()
 
void generateLocalDeclarations ()
 
void generateExpressions ()
 
virtual void generateKernelSource ()
 
void updateKernelConfiguration ()
 
void buildKernel ()
 
void setKernelArguments ()
 
cl_uint detectVectorWidth ()
 detects minimal vector width of all available types of Elements More...
 
void generateExtensions ()
 
void generateArguments ()
 
void generateIndex ()
 
void generateLocalDeclarations ()
 
void generateExpressions ()
 
virtual void generateKernelSource ()
 
void updateKernelConfiguration ()
 
void buildKernel ()
 
void setKernelArguments ()
 
- Protected Member Functions inherited from acl::ExpressionContainer
void filterDeclarations ()
 
void filterDeclarations ()
 

Protected Attributes

unsigned int id
 
unsigned int groupsNumber
 
KernelConfiguration kernelConfig
 
std::string kernelSource
 
cl::Kernel kernel
 
- Protected Attributes inherited from acl::ExpressionContainer
unsigned int size
 
CommandQueue queue
 
bool regenerateKernelSource
 
std::vector< Elementarguments
 
std::vector< ElementlocalDeclarations
 

Static Protected Attributes

static unsigned int kernelNum
 

Friends

class KernelMerger
 

Related Functions

(Note that these are not member functions.)

typedef std::shared_ptr< KernelSPKernel
 
typedef std::shared_ptr< KernelMergerSPKernelMerger
 
typedef std::shared_ptr< KernelSPKernel
 
typedef std::shared_ptr< KernelMergerSPKernelMerger
 
void createKernels (std::vector< SPKernel > &vk, unsigned int n, const KernelConfiguration &kernelConfig_=KERNEL_BASIC)
 
void createKernels (std::vector< SPKernel > &vk, unsigned int n, const KernelConfiguration &kernelConfig_=KERNEL_BASIC)
 

Additional Inherited Members

- Public Attributes inherited from acl::ExpressionContainer
std::vector< Elementexpression
 

Detailed Description

OpenCl Kernel generator.

Note:
The kernel can be run without updating of parameters. This possibility can lead to some optimization. to realize this possibility the function computeWithoutUpdate can be added
Note:
The kernel can be run without updating of parameters. This possibility can lead to some optimization. to realize this possibility the function computeWithoutUpdate can be added
Examples:
testASLData.cc, testKernel.cc, testKernelMerger.cc, testMatrixOfElements.cc, testOperators.cc, testPrivateVar.cc, and testVectorOfElements.cc.

Definition at line 48 of file aclKernel.h.

Constructor & Destructor Documentation

acl::Kernel::Kernel ( const KernelConfiguration  kernelConfig_ = KERNEL_BASIC)
explicit
acl::Kernel::Kernel ( const KernelConfiguration  kernelConfig_ = KERNEL_BASIC)
explicit

Member Function Documentation

void acl::Kernel::buildKernel ( )
protected
void acl::Kernel::buildKernel ( )
protected
void acl::Kernel::clear ( )

removes all expressions from the kernel

void acl::Kernel::clear ( )

removes all expressions from the kernel

void acl::Kernel::compute ( )
void acl::Kernel::compute ( )
cl_uint acl::Kernel::detectVectorWidth ( )
protected

detects minimal vector width of all available types of Elements

cl_uint acl::Kernel::detectVectorWidth ( )
protected

detects minimal vector width of all available types of Elements

void acl::Kernel::generateArguments ( )
protected
void acl::Kernel::generateArguments ( )
protected
void acl::Kernel::generateExpressions ( )
protected
void acl::Kernel::generateExpressions ( )
protected
void acl::Kernel::generateExtensions ( )
protected
void acl::Kernel::generateExtensions ( )
protected
void acl::Kernel::generateIndex ( )
protected
void acl::Kernel::generateIndex ( )
protected
virtual void acl::Kernel::generateKernelSource ( )
protectedvirtual
virtual void acl::Kernel::generateKernelSource ( )
protectedvirtual
void acl::Kernel::generateLocalDeclarations ( )
protected
void acl::Kernel::generateLocalDeclarations ( )
protected
const KernelConfiguration & acl::Kernel::getConfiguration ( ) const
inline

Definition at line 111 of file aclKernel.h.

const KernelConfiguration& acl::Kernel::getConfiguration ( ) const
inline
unsigned int acl::Kernel::getGroupsNumber ( )
unsigned int acl::Kernel::getGroupsNumber ( )
const cl::Kernel& acl::Kernel::getKernel ( ) const
const cl::Kernel& acl::Kernel::getKernel ( ) const
unsigned int acl::Kernel::getKernelID ( )
unsigned int acl::Kernel::getKernelID ( )
std::string acl::Kernel::getKernelSource ( )
Examples:
testASLData.cc.
std::string acl::Kernel::getKernelSource ( )
void acl::Kernel::setGroupsNumber ( unsigned int  n)
void acl::Kernel::setGroupsNumber ( unsigned int  n)
Examples:
testASLData.cc, and testKernel.cc.
void acl::Kernel::setKernelArguments ( )
protected
void acl::Kernel::setKernelArguments ( )
protected
void acl::Kernel::setup ( )

Prepares kernel for launch. Should always be called before compute() after all expressions are added. Generates kernel source, builds kernel and sets its arguments.

void acl::Kernel::setup ( )

Prepares kernel for launch. Should always be called before compute() after all expressions are added. Generates kernel source, builds kernel and sets its arguments.

Examples:
testASLData.cc, testKernel.cc, testMatrixOfElements.cc, testOperators.cc, and testVectorOfElements.cc.
void acl::Kernel::updateKernelConfiguration ( )
protected
void acl::Kernel::updateKernelConfiguration ( )
protected

Friends And Related Function Documentation

void createKernels ( std::vector< SPKernel > &  vk,
unsigned int  n,
const KernelConfiguration kernelConfig_ = KERNEL_BASIC 
)
related

creates n kernels in vk with configuration kernelConfig_

Definition at line 100 of file aclKernel.h.

void createKernels ( std::vector< SPKernel > &  vk,
unsigned int  n,
const KernelConfiguration kernelConfig_ = KERNEL_BASIC 
)
related

creates n kernels in vk with configuration kernelConfig_

Definition at line 100 of file aclKernel.h.

KernelMerger
friend

Definition at line 85 of file aclKernel.h.

typedef std::shared_ptr<Kernel> SPKernel
related

Definition at line 89 of file aclKernel.h.

typedef std::shared_ptr<Kernel> SPKernel
related

Definition at line 89 of file aclKernel.h.

Definition at line 70 of file aclKernelMerger.h.

Definition at line 70 of file aclKernelMerger.h.

Member Data Documentation

unsigned int acl::Kernel::groupsNumber
protected

Definition at line 53 of file aclKernel.h.

unsigned int acl::Kernel::id
protected

Definition at line 52 of file aclKernel.h.

cl::Kernel acl::Kernel::kernel
protected

Definition at line 56 of file aclKernel.h.

KernelConfiguration acl::Kernel::kernelConfig
protected

Definition at line 54 of file aclKernel.h.

static unsigned int acl::Kernel::kernelNum
staticprotected

Definition at line 51 of file aclKernel.h.

std::string acl::Kernel::kernelSource
protected

Definition at line 55 of file aclKernel.h.


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