go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Public Types | Public Member Functions | Data Fields | Private Attributes
itk::OpenCLKernel Class Reference

#include <itkOpenCLKernel.h>

Detailed Description

The OpenCLKernel class represents an executable entry point function in an OpenCL program.

Definition at line 138 of file itkOpenCLKernel.h.

Public Types

typedef CovariantVector< double, 1 > CovariantVectorDouble1DType
 
typedef CovariantVector< double, 2 > CovariantVectorDouble2DType
 
typedef CovariantVector< double, 3 > CovariantVectorDouble3DType
 
typedef CovariantVector< double, 4 > CovariantVectorDouble4DType
 
typedef CovariantVector< float, 1 > CovariantVectorFloat1DType
 
typedef CovariantVector< float, 2 > CovariantVectorFloat2DType
 
typedef CovariantVector< float, 3 > CovariantVectorFloat3DType
 
typedef CovariantVector< float, 4 > CovariantVectorFloat4DType
 
typedef CovariantVector< int, 1 > CovariantVectorInt1DType
 
typedef CovariantVector< int, 2 > CovariantVectorInt2DType
 
typedef CovariantVector< int, 3 > CovariantVectorInt3DType
 
typedef CovariantVector< int, 4 > CovariantVectorInt4DType
 
typedef Index< 1 > Index1DType
 
typedef Index< 2 > Index2DType
 
typedef Index< 3 > Index3DType
 
typedef Index< 4 > Index4DType
 
typedef Matrix< double, 1, 1 > MatrixDouble1x1Type
 
typedef Matrix< double, 2, 2 > MatrixDouble2x2Type
 
typedef Matrix< double, 3, 3 > MatrixDouble3x3Type
 
typedef Matrix< double, 4, 4 > MatrixDouble4x4Type
 
typedef Matrix< float, 1, 1 > MatrixFloat1x1Type
 
typedef Matrix< float, 2, 2 > MatrixFloat2x2Type
 
typedef Matrix< float, 3, 3 > MatrixFloat3x3Type
 
typedef Matrix< float, 4, 4 > MatrixFloat4x4Type
 
typedef Offset< 1 > Offset1DType
 
typedef Offset< 2 > Offset2DType
 
typedef Offset< 3 > Offset3DType
 
typedef Offset< 4 > Offset4DType
 
typedef Point< double, 1 > PointDouble1DType
 
typedef Point< double, 2 > PointDouble2DType
 
typedef Point< double, 3 > PointDouble3DType
 
typedef Point< double, 4 > PointDouble4DType
 
typedef Point< float, 1 > PointFloat1DType
 
typedef Point< float, 2 > PointFloat2DType
 
typedef Point< float, 3 > PointFloat3DType
 
typedef Point< float, 4 > PointFloat4DType
 
typedef Point< int, 1 > PointInt1DType
 
typedef Point< int, 2 > PointInt2DType
 
typedef Point< int, 3 > PointInt3DType
 
typedef Point< int, 4 > PointInt4DType
 
typedef OpenCLMemoryObject Self
 
typedef Size< 1 > Size1DType
 
typedef Size< 2 > Size2DType
 
typedef Size< 3 > Size3DType
 
typedef Size< 4 > Size4DType
 
typedef Vector< double, 1 > VectorDouble1DType
 
typedef Vector< double, 2 > VectorDouble2DType
 
typedef Vector< double, 3 > VectorDouble3DType
 
typedef Vector< double, 4 > VectorDouble4DType
 
typedef Vector< float, 1 > VectorFloat1DType
 
typedef Vector< float, 2 > VectorFloat2DType
 
typedef Vector< float, 3 > VectorFloat3DType
 
typedef Vector< float, 4 > VectorFloat4DType
 
typedef Vector< int, 1 > VectorInt1DType
 
typedef Vector< int, 2 > VectorInt2DType
 
typedef Vector< int, 3 > VectorInt3DType
 
typedef Vector< int, 4 > VectorInt4DType
 

Public Member Functions

OpenCLSize GetBestLocalWorkSizeImage (const std::vcl_size_t dimension) const
 
OpenCLSize GetBestLocalWorkSizeImage1D () const
 
OpenCLSize GetBestLocalWorkSizeImage2D () const
 
OpenCLSize GetBestLocalWorkSizeImage3D () const
 
OpenCLSize GetCompileWorkGroupSize () const
 
OpenCLSize GetCompileWorkGroupSize (const OpenCLDevice &device) const
 
OpenCLContextGetContext () const
 
bool GetDoubleAsFloatEnabled ()
 
OpenCLSize GetGlobalWorkOffset () const
 
OpenCLSize GetGlobalWorkSize () const
 
cl_kernel GetKernelId () const
 
OpenCLSize GetLocalWorkSize () const
 
std::string GetName () const
 
std::vcl_size_t GetNumberOfArguments () const
 
vcl_size_t GetPreferredWorkSizeMultiple () const
 
OpenCLProgram GetProgram () const
 
bool IsNull () const
 
OpenCLEvent LaunchKernel ()
 
OpenCLEvent LaunchKernel (const OpenCLSize &global_work_size, const OpenCLSize &local_work_size=OpenCLSize::null, const OpenCLSize &global_work_offset=OpenCLSize::null)
 
OpenCLEvent LaunchKernel (const OpenCLEventList &event_list)
 
OpenCLEvent LaunchKernel (const OpenCLEventList &event_list, const OpenCLSize &global_work_size, const OpenCLSize &local_work_size=OpenCLSize::null, const OpenCLSize &global_work_offset=OpenCLSize::null)
 
bool LaunchTask (const OpenCLEventList &event_list)
 
OpenCLEvent LaunchTaskAsync (const OpenCLEventList &event_list)
 
 OpenCLKernel ()
 
 OpenCLKernel (OpenCLContext *context, const cl_kernel id)
 
 OpenCLKernel (const OpenCLKernel &other)
 
 OpenCLKernelSetArgsMacroH (cl_uchar, cl_uchar2, cl_uchar4, cl_uchar8, cl_uchar16) OpenCLKernelSetArgsMacroH(cl_char
 
cl_char16 OpenCLKernelSetArgsMacroH (cl_ushort, cl_ushort2, cl_ushort4, cl_ushort8, cl_ushort16) OpenCLKernelSetArgsMacroH(cl_short
 
cl_char16 cl_short16 OpenCLKernelSetArgsMacroH (cl_uint, cl_uint2, cl_uint4, cl_uint8, cl_uint16) OpenCLKernelSetArgsMacroH(cl_int
 
cl_char16 cl_short16 cl_int16 OpenCLKernelSetArgsMacroH (cl_ulong, cl_ulong2, cl_ulong4, cl_ulong8, cl_ulong16) OpenCLKernelSetArgsMacroH(cl_long
 
cl_char16 cl_short16 cl_int16 cl_long16 OpenCLKernelSetArgsMacroH (cl_float, cl_float2, cl_float4, cl_float8, cl_float16) OpenCLKernelSetArgsMacroH(cl_double
 
OpenCLEvent operator() ()
 
template<typename T1 >
OpenCLEvent operator() (const T1 &arg1)
 
template<typename T1 , typename T2 >
OpenCLEvent operator() (const T1 &arg1, const T2 &arg2)
 
template<typename T1 , typename T2 , typename T3 >
OpenCLEvent operator() (const T1 &arg1, const T2 &arg2, const T3 &arg3)
 
template<typename T1 , typename T2 , typename T3 , typename T4 >
OpenCLEvent operator() (const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4)
 
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
OpenCLEvent operator() (const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5)
 
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 >
OpenCLEvent operator() (const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6)
 
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 >
OpenCLEvent operator() (const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7)
 
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 >
OpenCLEvent operator() (const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7, const T8 &arg8)
 
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 >
OpenCLEvent operator() (const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7, const T8 &arg8, const T9 &arg9)
 
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 >
OpenCLEvent operator() (const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7, const T8 &arg8, const T9 &arg9, const T10 &arg10)
 
OpenCLKerneloperator= (const OpenCLKernel &other)
 
cl_char16 cl_short16 cl_int16 cl_long16 cl_double16 cl_int SetArg (const cl_uint index, const void *data, const vcl_size_t size)
 
cl_int SetArg (const cl_uint index, const Size1DType &value)
 
cl_int SetArg (const cl_uint index, const Size2DType &value)
 
cl_int SetArg (const cl_uint index, const Size3DType &value)
 
cl_int SetArg (const cl_uint index, const Size4DType &value)
 
cl_int SetArg (const cl_uint index, const Index1DType &value)
 
cl_int SetArg (const cl_uint index, const Index2DType &value)
 
cl_int SetArg (const cl_uint index, const Index3DType &value)
 
cl_int SetArg (const cl_uint index, const Index4DType &value)
 
cl_int SetArg (const cl_uint index, const Offset1DType &value)
 
cl_int SetArg (const cl_uint index, const Offset2DType &value)
 
cl_int SetArg (const cl_uint index, const Offset3DType &value)
 
cl_int SetArg (const cl_uint index, const Offset4DType &value)
 
cl_int SetArg (const cl_uint index, const PointInt1DType &value)
 
cl_int SetArg (const cl_uint index, const PointFloat1DType &value)
 
cl_int SetArg (const cl_uint index, const PointDouble1DType &value)
 
cl_int SetArg (const cl_uint index, const PointInt2DType &value)
 
cl_int SetArg (const cl_uint index, const PointFloat2DType &value)
 
cl_int SetArg (const cl_uint index, const PointDouble2DType &value)
 
cl_int SetArg (const cl_uint index, const PointInt3DType &value)
 
cl_int SetArg (const cl_uint index, const PointFloat3DType &value)
 
cl_int SetArg (const cl_uint index, const PointDouble3DType &value)
 
cl_int SetArg (const cl_uint index, const PointInt4DType &value)
 
cl_int SetArg (const cl_uint index, const PointFloat4DType &value)
 
cl_int SetArg (const cl_uint index, const PointDouble4DType &value)
 
cl_int SetArg (const cl_uint index, const VectorInt1DType &value)
 
cl_int SetArg (const cl_uint index, const VectorFloat1DType &value)
 
cl_int SetArg (const cl_uint index, const VectorDouble1DType &value)
 
cl_int SetArg (const cl_uint index, const VectorInt2DType &value)
 
cl_int SetArg (const cl_uint index, const VectorFloat2DType &value)
 
cl_int SetArg (const cl_uint index, const VectorDouble2DType &value)
 
cl_int SetArg (const cl_uint index, const VectorInt3DType &value)
 
cl_int SetArg (const cl_uint index, const VectorFloat3DType &value)
 
cl_int SetArg (const cl_uint index, const VectorDouble3DType &value)
 
cl_int SetArg (const cl_uint index, const VectorInt4DType &value)
 
cl_int SetArg (const cl_uint index, const VectorFloat4DType &value)
 
cl_int SetArg (const cl_uint index, const VectorDouble4DType &value)
 
cl_int SetArg (const cl_uint index, const CovariantVectorInt1DType &value)
 
cl_int SetArg (const cl_uint index, const CovariantVectorFloat1DType &value)
 
cl_int SetArg (const cl_uint index, const CovariantVectorDouble1DType &value)
 
cl_int SetArg (const cl_uint index, const CovariantVectorInt2DType &value)
 
cl_int SetArg (const cl_uint index, const CovariantVectorFloat2DType &value)
 
cl_int SetArg (const cl_uint index, const CovariantVectorDouble2DType &value)
 
cl_int SetArg (const cl_uint index, const CovariantVectorInt3DType &value)
 
cl_int SetArg (const cl_uint index, const CovariantVectorFloat3DType &value)
 
cl_int SetArg (const cl_uint index, const CovariantVectorDouble3DType &value)
 
cl_int SetArg (const cl_uint index, const CovariantVectorInt4DType &value)
 
cl_int SetArg (const cl_uint index, const CovariantVectorFloat4DType &value)
 
cl_int SetArg (const cl_uint index, const CovariantVectorDouble4DType &value)
 
cl_int SetArg (const cl_uint index, const MatrixFloat1x1Type &value)
 
cl_int SetArg (const cl_uint index, const MatrixDouble1x1Type &value)
 
cl_int SetArg (const cl_uint index, const MatrixFloat2x2Type &value)
 
cl_int SetArg (const cl_uint index, const MatrixDouble2x2Type &value)
 
cl_int SetArg (const cl_uint index, const MatrixFloat3x3Type &value)
 
cl_int SetArg (const cl_uint index, const MatrixDouble3x3Type &value)
 
cl_int SetArg (const cl_uint index, const MatrixFloat4x4Type &value)
 
cl_int SetArg (const cl_uint index, const MatrixDouble4x4Type &value)
 
cl_int SetArg (const cl_uint index, const OpenCLMemoryObject &value)
 
cl_int SetArg (const cl_uint index, const OpenCLVectorBase &value)
 
cl_int SetArg (const cl_uint index, const OpenCLSampler &value)
 
void SetDoubleAsFloat (const bool value)
 
void SetDoubleAsFloatDisable ()
 
void SetDoubleAsFloatEnable ()
 
void SetGlobalWorkOffset (const OpenCLSize &offset)
 
void SetGlobalWorkSize (const OpenCLSize &size)
 
void SetLocalWorkSize (const OpenCLSize &size)
 
void SetRoundedGlobalWorkSize (const OpenCLSize &size)
 
 ~OpenCLKernel ()
 

Data Fields

 cl_char2
 
 cl_char4
 
 cl_char8
 
cl_char16 cl_short16 cl_int16 cl_long16 cl_double2
 
cl_char16 cl_short16 cl_int16 cl_long16 cl_double4
 
cl_char16 cl_short16 cl_int16 cl_long16 cl_double8
 
cl_char16 cl_short16 cl_int2
 
cl_char16 cl_short16 cl_int4
 
cl_char16 cl_short16 cl_int8
 
cl_char16 cl_short16 cl_int16 cl_long2
 
cl_char16 cl_short16 cl_int16 cl_long4
 
cl_char16 cl_short16 cl_int16 cl_long8
 
cl_char16 cl_short2
 
cl_char16 cl_short4
 
cl_char16 cl_short8
 

Private Attributes

std::auto_ptr< OpenCLKernelPimpl > d_ptr
 
bool m_DoubleAsFloat
 
cl_kernel m_KernelId
 

Member Typedef Documentation

Definition at line 426 of file itkOpenCLKernel.h.

Definition at line 435 of file itkOpenCLKernel.h.

Definition at line 444 of file itkOpenCLKernel.h.

Definition at line 453 of file itkOpenCLKernel.h.

Definition at line 423 of file itkOpenCLKernel.h.

Definition at line 432 of file itkOpenCLKernel.h.

Definition at line 441 of file itkOpenCLKernel.h.

Definition at line 450 of file itkOpenCLKernel.h.

typedef CovariantVector< int, 1 > itk::OpenCLKernel::CovariantVectorInt1DType

Sets argument index for this kernel to covariant vector value.

Definition at line 420 of file itkOpenCLKernel.h.

typedef CovariantVector< int, 2 > itk::OpenCLKernel::CovariantVectorInt2DType

Definition at line 429 of file itkOpenCLKernel.h.

typedef CovariantVector< int, 3 > itk::OpenCLKernel::CovariantVectorInt3DType

Definition at line 438 of file itkOpenCLKernel.h.

typedef CovariantVector< int, 4 > itk::OpenCLKernel::CovariantVectorInt4DType

Definition at line 447 of file itkOpenCLKernel.h.

typedef Index< 1 > itk::OpenCLKernel::Index1DType

Sets argument index for this kernel to index value.

Definition at line 319 of file itkOpenCLKernel.h.

typedef Index< 2 > itk::OpenCLKernel::Index2DType

Definition at line 322 of file itkOpenCLKernel.h.

typedef Index< 3 > itk::OpenCLKernel::Index3DType

Definition at line 325 of file itkOpenCLKernel.h.

typedef Index< 4 > itk::OpenCLKernel::Index4DType

Definition at line 328 of file itkOpenCLKernel.h.

Definition at line 460 of file itkOpenCLKernel.h.

Definition at line 466 of file itkOpenCLKernel.h.

Definition at line 472 of file itkOpenCLKernel.h.

Definition at line 478 of file itkOpenCLKernel.h.

Sets argument index for this kernel to matrix value.

Definition at line 457 of file itkOpenCLKernel.h.

Definition at line 463 of file itkOpenCLKernel.h.

Definition at line 469 of file itkOpenCLKernel.h.

Definition at line 475 of file itkOpenCLKernel.h.

typedef Offset< 1 > itk::OpenCLKernel::Offset1DType

Sets argument index for this kernel to offset value.

Definition at line 332 of file itkOpenCLKernel.h.

typedef Offset< 2 > itk::OpenCLKernel::Offset2DType

Definition at line 335 of file itkOpenCLKernel.h.

typedef Offset< 3 > itk::OpenCLKernel::Offset3DType

Definition at line 338 of file itkOpenCLKernel.h.

typedef Offset< 4 > itk::OpenCLKernel::Offset4DType

Definition at line 341 of file itkOpenCLKernel.h.

Definition at line 351 of file itkOpenCLKernel.h.

Definition at line 360 of file itkOpenCLKernel.h.

Definition at line 369 of file itkOpenCLKernel.h.

Definition at line 378 of file itkOpenCLKernel.h.

Definition at line 348 of file itkOpenCLKernel.h.

Definition at line 357 of file itkOpenCLKernel.h.

Definition at line 366 of file itkOpenCLKernel.h.

Definition at line 375 of file itkOpenCLKernel.h.

Sets argument index for this kernel to point value.

Definition at line 345 of file itkOpenCLKernel.h.

Definition at line 354 of file itkOpenCLKernel.h.

Definition at line 363 of file itkOpenCLKernel.h.

Definition at line 372 of file itkOpenCLKernel.h.

Standard class typedefs.

Definition at line 143 of file itkOpenCLKernel.h.

typedef Size< 1 > itk::OpenCLKernel::Size1DType

Sets argument index for this kernel to size value.

Definition at line 306 of file itkOpenCLKernel.h.

typedef Size< 2 > itk::OpenCLKernel::Size2DType

Definition at line 309 of file itkOpenCLKernel.h.

typedef Size< 3 > itk::OpenCLKernel::Size3DType

Definition at line 312 of file itkOpenCLKernel.h.

typedef Size< 4 > itk::OpenCLKernel::Size4DType

Definition at line 315 of file itkOpenCLKernel.h.

Definition at line 389 of file itkOpenCLKernel.h.

Definition at line 398 of file itkOpenCLKernel.h.

Definition at line 407 of file itkOpenCLKernel.h.

Definition at line 416 of file itkOpenCLKernel.h.

Definition at line 386 of file itkOpenCLKernel.h.

Definition at line 395 of file itkOpenCLKernel.h.

Definition at line 404 of file itkOpenCLKernel.h.

Definition at line 413 of file itkOpenCLKernel.h.

Sets argument index for this kernel to vector value. ITK Vector typedefs.

Definition at line 383 of file itkOpenCLKernel.h.

Definition at line 392 of file itkOpenCLKernel.h.

Definition at line 401 of file itkOpenCLKernel.h.

Definition at line 410 of file itkOpenCLKernel.h.

Constructor & Destructor Documentation

itk::OpenCLKernel::OpenCLKernel ( )

Constructs a null OpenCL kernel object.

itk::OpenCLKernel::OpenCLKernel ( OpenCLContext context,
const cl_kernel  id 
)

Constructs an OpenCL kernel object from the native identifier id, and associates it with GetContext. This class will take over ownership of id and release it in the destructor.

itk::OpenCLKernel::OpenCLKernel ( const OpenCLKernel other)

Constructs a copy of other.

itk::OpenCLKernel::~OpenCLKernel ( )

Releases this OpenCL kernel object. If this is the last reference to the kernel, it will be destroyed.

Member Function Documentation

OpenCLSize itk::OpenCLKernel::GetBestLocalWorkSizeImage ( const std::vcl_size_t  dimension) const

Returns the recommended best local work size for 1D/2D/3D image processing based on the dimension on this kernel.

OpenCLSize itk::OpenCLKernel::GetBestLocalWorkSizeImage1D ( ) const

Returns the recommended best local work size for 1D image processing on this kernel. Default value is 8 unless the maximum work size is not large enough to accommodate 8 items.

See also
GetBestLocalWorkSizeImage2D(), GetBestLocalWorkSizeImage3D
OpenCLSize itk::OpenCLKernel::GetBestLocalWorkSizeImage2D ( ) const

Returns the recommended best local work size for 2D image processing on this kernel. Default value is 8x8 unless the maximum work size is not large enough to accommodate 8x8 items.

See also
GetBestLocalWorkSizeImage1D, GetBestLocalWorkSizeImage3D()
OpenCLSize itk::OpenCLKernel::GetBestLocalWorkSizeImage3D ( ) const

Returns the recommended best local work size for 3D image processing on this kernel. Default value is 8x8x8 unless the maximum work size is not large enough to accommodate 8x8x8 items.

See also
GetBestLocalWorkSizeImage1D, GetBestLocalWorkSizeImage2D()
OpenCLSize itk::OpenCLKernel::GetCompileWorkGroupSize ( ) const

Returns the work group size that was declared in the kernel's source code using a {reqd_work_group_size} qualifier. Returns (0, 0, 0) if the size is not declared. The default device for GetContext() is used to retrieve the work group size.

OpenCLSize itk::OpenCLKernel::GetCompileWorkGroupSize ( const OpenCLDevice device) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the work group size that was declared in the kernel's source code using a {reqd_work_group_size} qualifier. Returns (0, 0, 0) if the size is not declared. The specified device is used to retrieve the work group size.

OpenCLContext* itk::OpenCLKernel::GetContext ( ) const

Returns the OpenCL GetContext that this kernel was created within.

bool itk::OpenCLKernel::GetDoubleAsFloatEnabled ( )
inline

Definition at line 265 of file itkOpenCLKernel.h.

OpenCLSize itk::OpenCLKernel::GetGlobalWorkOffset ( ) const

Returns the global work offset size for this instance of the kernel. The default value is 0.

See also
SetGlobalWorkOffset()
OpenCLSize itk::OpenCLKernel::GetGlobalWorkSize ( ) const

Returns the global work size for this instance of the kernel. The default value is 1.

See also
SetGlobalWorkSize(), GetLocalWorkSize()
cl_kernel itk::OpenCLKernel::GetKernelId ( ) const

Returns the native OpenCL identifier for this kernel.

OpenCLSize itk::OpenCLKernel::GetLocalWorkSize ( ) const

Returns the local work size for this instance of the kernel. The default value is 0, which indicates that the local work size is not used.

See also
SetLocalWorkSize(), GetGlobalWorkSize()
std::string itk::OpenCLKernel::GetName ( ) const

Returns the name of this OpenCL kernel's entry point function.

std::vcl_size_t itk::OpenCLKernel::GetNumberOfArguments ( ) const

Returns the number of arguments that are expected by this OpenCL kernel.

See also
setArg()
vcl_size_t itk::OpenCLKernel::GetPreferredWorkSizeMultiple ( ) const

Returns the preferred work group size multiple, which is a performance hint for the local work group size on OpenCL 1.1 systems. Returns zero if the system is OpenCL 1.0, or a preferred work group size multiple is not available.

OpenCLProgram itk::OpenCLKernel::GetProgram ( ) const

Returns the OpenCL program that this kernel is associated with.

bool itk::OpenCLKernel::IsNull ( ) const

Returns true if this OpenCL kernel object is null, false otherwise.

OpenCLEvent itk::OpenCLKernel::LaunchKernel ( )

Requests that this kernel instance be run on GetGlobalWorkSize() items, optionally subdivided into work groups of GetLocalWorkSize() items. Returns an event object that can be used to wait for the kernel to finish execution. The request is executed on the active command queue for GetContext().

See also
operator()()
OpenCLEvent itk::OpenCLKernel::LaunchKernel ( const OpenCLSize global_work_size,
const OpenCLSize local_work_size = OpenCLSize::null,
const OpenCLSize global_work_offset = OpenCLSize::null 
)
OpenCLEvent itk::OpenCLKernel::LaunchKernel ( const OpenCLEventList event_list)

Requests that this kernel instance be run on GetGlobalWorkSize() items, optionally subdivided into work groups of GetLocalWorkSize() items. If event_list is not an empty list, it indicates the events that must be signaled as finished before this kernel instance can begin executing. Returns an event object that can be used to wait for the kernel to finish execution. The request is executed on the active command queue for GetContext().

OpenCLEvent itk::OpenCLKernel::LaunchKernel ( const OpenCLEventList event_list,
const OpenCLSize global_work_size,
const OpenCLSize local_work_size = OpenCLSize::null,
const OpenCLSize global_work_offset = OpenCLSize::null 
)
bool itk::OpenCLKernel::LaunchTask ( const OpenCLEventList event_list)

Enqueues a command to execute a kernel on a device. The kernel is executed using a single work-item. Returns true if the task was successful, false otherwise. This function will block until the request finishes. The request is executed on the active command queue for context().

See also
LaunchTaskAsync()
OpenCLEvent itk::OpenCLKernel::LaunchTaskAsync ( const OpenCLEventList event_list)

Asynchronous version of the LaunchTask() method. This function will queue the task event_list and return immediately. Returns an OpenCLEvent object that can be used to wait for the request to finish. The request will not start until all of the events in event_list have been signaled as completed.

See also
LaunchTask(), OpenCLEvent::IsComplete()
itk::OpenCLKernel::OpenCLKernelSetArgsMacroH ( cl_uchar  ,
cl_uchar2  ,
cl_uchar4  ,
cl_uchar8  ,
cl_uchar16   
)

Sets argument index for this kernel to value. The argument is assumed to have been declared with the types: char(n), uchar(n), short(n), ushort(n), int(n), uint(n), long(n), ulong(n), float(n), double(n). Due to number of overloads below, we have to use C++11 std::enable_if, std::is_scalar, std::is_union, which doesn't supported by all compilers. Sets argument index for this kernel to value. Macro definitions of SetArg() methods for types: char(n), uchar(n), short(n), ushort(n), int(n), uint(n), long(n), ulong(n), float(n), double(n).

Note
Instead of using macro, we could just use templated version of the SetArg() with C++11 here (see commented code above).
cl_char16 itk::OpenCLKernel::OpenCLKernelSetArgsMacroH ( cl_ushort  ,
cl_ushort2  ,
cl_ushort4  ,
cl_ushort8  ,
cl_ushort16   
)
cl_char16 cl_short16 itk::OpenCLKernel::OpenCLKernelSetArgsMacroH ( cl_uint  ,
cl_uint2  ,
cl_uint4  ,
cl_uint8  ,
cl_uint16   
)
cl_char16 cl_short16 cl_int16 itk::OpenCLKernel::OpenCLKernelSetArgsMacroH ( cl_ulong  ,
cl_ulong2  ,
cl_ulong4  ,
cl_ulong8  ,
cl_ulong16   
)
cl_char16 cl_short16 cl_int16 cl_long16 itk::OpenCLKernel::OpenCLKernelSetArgsMacroH ( cl_float  ,
cl_float2  ,
cl_float4  ,
cl_float8  ,
cl_float16   
)
OpenCLEvent itk::OpenCLKernel::operator() ( void  )
inline

Runs this kernel instance with zero arguments. Returns an event object that can be used to wait for the kernel to finish execution.

Definition at line 540 of file itkOpenCLKernel.h.

template<typename T1 >
OpenCLEvent itk::OpenCLKernel::operator() ( const T1 &  arg1)
inline

Runs this kernel instance with the argument arg1. Returns an event object that can be used to wait for the kernel to finish execution.

Definition at line 546 of file itkOpenCLKernel.h.

template<typename T1 , typename T2 >
OpenCLEvent itk::OpenCLKernel::operator() ( const T1 &  arg1,
const T2 &  arg2 
)
inline

Runs this kernel instance with the arguments arg1 and arg2. Returns an event object that can be used to wait for the kernel to finish execution.

Definition at line 557 of file itkOpenCLKernel.h.

template<typename T1 , typename T2 , typename T3 >
OpenCLEvent itk::OpenCLKernel::operator() ( const T1 &  arg1,
const T2 &  arg2,
const T3 &  arg3 
)
inline

Runs this kernel instance with the arguments arg1, arg2, and arg3. Returns an event object that can be used to wait for the kernel to finish execution.

Definition at line 570 of file itkOpenCLKernel.h.

template<typename T1 , typename T2 , typename T3 , typename T4 >
OpenCLEvent itk::OpenCLKernel::operator() ( const T1 &  arg1,
const T2 &  arg2,
const T3 &  arg3,
const T4 &  arg4 
)
inline

Runs this kernel instance with the arguments arg1, arg2, arg3, and arg4. Returns an event object that can be used to wait for the kernel to finish execution.

Definition at line 584 of file itkOpenCLKernel.h.

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
OpenCLEvent itk::OpenCLKernel::operator() ( const T1 &  arg1,
const T2 &  arg2,
const T3 &  arg3,
const T4 &  arg4,
const T5 &  arg5 
)
inline

Runs this kernel instance with the arguments arg1, arg2, arg3, arg4, and arg5. Returns an event object that can be used to wait for the kernel to finish execution.

Definition at line 600 of file itkOpenCLKernel.h.

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 >
OpenCLEvent itk::OpenCLKernel::operator() ( const T1 &  arg1,
const T2 &  arg2,
const T3 &  arg3,
const T4 &  arg4,
const T5 &  arg5,
const T6 &  arg6 
)
inline

Runs this kernel instance with the arguments arg1, arg2, arg3, arg4, arg5, and arg6. Returns an event object that can be used to wait for the kernel to finish execution.

Definition at line 618 of file itkOpenCLKernel.h.

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 >
OpenCLEvent itk::OpenCLKernel::operator() ( const T1 &  arg1,
const T2 &  arg2,
const T3 &  arg3,
const T4 &  arg4,
const T5 &  arg5,
const T6 &  arg6,
const T7 &  arg7 
)
inline

Runs this kernel instance with the arguments arg1, arg2, arg3, arg4, arg5, arg6, and arg7. Returns an event object that can be used to wait for the kernel to finish execution.

Definition at line 637 of file itkOpenCLKernel.h.

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 >
OpenCLEvent itk::OpenCLKernel::operator() ( const T1 &  arg1,
const T2 &  arg2,
const T3 &  arg3,
const T4 &  arg4,
const T5 &  arg5,
const T6 &  arg6,
const T7 &  arg7,
const T8 &  arg8 
)
inline

Runs this kernel instance with the arguments arg1, arg2, arg3, arg4, arg5, arg6, arg7, and arg8. Returns an event object that can be used to wait for the kernel to finish execution.

Definition at line 657 of file itkOpenCLKernel.h.

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 >
OpenCLEvent itk::OpenCLKernel::operator() ( const T1 &  arg1,
const T2 &  arg2,
const T3 &  arg3,
const T4 &  arg4,
const T5 &  arg5,
const T6 &  arg6,
const T7 &  arg7,
const T8 &  arg8,
const T9 &  arg9 
)
inline

Runs this kernel instance with the arguments arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, and arg9. Returns an event object that can be used to wait for the kernel to finish execution.

Definition at line 680 of file itkOpenCLKernel.h.

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 >
OpenCLEvent itk::OpenCLKernel::operator() ( const T1 &  arg1,
const T2 &  arg2,
const T3 &  arg3,
const T4 &  arg4,
const T5 &  arg5,
const T6 &  arg6,
const T7 &  arg7,
const T8 &  arg8,
const T9 &  arg9,
const T10 &  arg10 
)
inline

Runs this kernel instance with the arguments arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, and arg10. Returns an event object that can be used to wait for the kernel to finish execution.

Definition at line 705 of file itkOpenCLKernel.h.

OpenCLKernel& itk::OpenCLKernel::operator= ( const OpenCLKernel other)

Assigns other to this object.

cl_char16 cl_short16 cl_int16 cl_long16 cl_double16 cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const void *  data,
const vcl_size_t  size 
)

Sets argument index to the size bytes at data.

cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const Size1DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const Size2DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const Size3DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const Size4DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const Index1DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const Index2DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const Index3DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const Index4DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const Offset1DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const Offset2DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const Offset3DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const Offset4DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const PointInt1DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const PointFloat1DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const PointDouble1DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const PointInt2DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const PointFloat2DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const PointDouble2DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const PointInt3DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const PointFloat3DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const PointDouble3DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const PointInt4DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const PointFloat4DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const PointDouble4DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const VectorInt1DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const VectorFloat1DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const VectorDouble1DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const VectorInt2DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const VectorFloat2DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const VectorDouble2DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const VectorInt3DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const VectorFloat3DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const VectorDouble3DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const VectorInt4DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const VectorFloat4DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const VectorDouble4DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const CovariantVectorInt1DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const CovariantVectorFloat1DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const CovariantVectorDouble1DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const CovariantVectorInt2DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const CovariantVectorFloat2DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const CovariantVectorDouble2DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const CovariantVectorInt3DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const CovariantVectorFloat3DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const CovariantVectorDouble3DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const CovariantVectorInt4DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const CovariantVectorFloat4DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const CovariantVectorDouble4DType value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const MatrixFloat1x1Type value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const MatrixDouble1x1Type value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const MatrixFloat2x2Type value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const MatrixDouble2x2Type value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const MatrixFloat3x3Type value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const MatrixDouble3x3Type value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const MatrixFloat4x4Type value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const MatrixDouble4x4Type value 
)
cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const OpenCLMemoryObject value 
)

Sets argument index for this kernel to value. The argument is assumed to have been declared with the type image1d_t, image2d_t, image3d_t, or be a pointer to a buffer, according to the type of memory object represented by value.

cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const OpenCLVectorBase value 
)

Sets argument index for this kernel to value. The argument is assumed to have been declared as a pointer to a buffer.

cl_int itk::OpenCLKernel::SetArg ( const cl_uint  index,
const OpenCLSampler value 
)

Sets argument index for this kernel to value. The argument is assumed to have been declared with the type sampler_t.

void itk::OpenCLKernel::SetDoubleAsFloat ( const bool  value)
inline

Sets the flag double as float to value. Default is true. By enabling this flag, setting kernel with all double values are converted to float. Doesn't effect SetArg(index, double(n)) method.

See also
GetDoubleAsFloatEnabled()

Definition at line 262 of file itkOpenCLKernel.h.

void itk::OpenCLKernel::SetDoubleAsFloatDisable ( )
inline

Definition at line 264 of file itkOpenCLKernel.h.

void itk::OpenCLKernel::SetDoubleAsFloatEnable ( )
inline

Definition at line 263 of file itkOpenCLKernel.h.

void itk::OpenCLKernel::SetGlobalWorkOffset ( const OpenCLSize offset)

Sets the offset for this instance of the kernel to offset.

See also
GetLocalWorkSize()
void itk::OpenCLKernel::SetGlobalWorkSize ( const OpenCLSize size)

Sets the global work size for this instance of the kernel to size.

See also
GetGlobalWorkSize(), SetLocalWorkSize(), SetRoundedGlobalWorkSize()
void itk::OpenCLKernel::SetLocalWorkSize ( const OpenCLSize size)

Sets the local work size for this instance of the kernel to size.

See also
SetGlobalWorkSize()
void itk::OpenCLKernel::SetRoundedGlobalWorkSize ( const OpenCLSize size)

Sets the global work size for this instance of the kernel to size, after rounding it up to the next multiple of GetLocalWorkSize().

See also
GetGlobalWorkSize(), OpenCLSize::RoundTo()

Field Documentation

itk::OpenCLKernel::cl_char2

Definition at line 292 of file itkOpenCLKernel.h.

itk::OpenCLKernel::cl_char4

Definition at line 292 of file itkOpenCLKernel.h.

itk::OpenCLKernel::cl_char8

Definition at line 292 of file itkOpenCLKernel.h.

cl_char16 cl_short16 cl_int16 cl_long16 itk::OpenCLKernel::cl_double2

Definition at line 300 of file itkOpenCLKernel.h.

cl_char16 cl_short16 cl_int16 cl_long16 itk::OpenCLKernel::cl_double4

Definition at line 300 of file itkOpenCLKernel.h.

cl_char16 cl_short16 cl_int16 cl_long16 itk::OpenCLKernel::cl_double8

Definition at line 300 of file itkOpenCLKernel.h.

cl_char16 cl_short16 itk::OpenCLKernel::cl_int2

Definition at line 296 of file itkOpenCLKernel.h.

cl_char16 cl_short16 itk::OpenCLKernel::cl_int4

Definition at line 296 of file itkOpenCLKernel.h.

cl_char16 cl_short16 itk::OpenCLKernel::cl_int8

Definition at line 296 of file itkOpenCLKernel.h.

cl_char16 cl_short16 cl_int16 itk::OpenCLKernel::cl_long2

Definition at line 298 of file itkOpenCLKernel.h.

cl_char16 cl_short16 cl_int16 itk::OpenCLKernel::cl_long4

Definition at line 298 of file itkOpenCLKernel.h.

cl_char16 cl_short16 cl_int16 itk::OpenCLKernel::cl_long8

Definition at line 298 of file itkOpenCLKernel.h.

cl_char16 itk::OpenCLKernel::cl_short2

Definition at line 294 of file itkOpenCLKernel.h.

cl_char16 itk::OpenCLKernel::cl_short4

Definition at line 294 of file itkOpenCLKernel.h.

cl_char16 itk::OpenCLKernel::cl_short8

Definition at line 294 of file itkOpenCLKernel.h.

std::auto_ptr< OpenCLKernelPimpl > itk::OpenCLKernel::d_ptr
private

Definition at line 725 of file itkOpenCLKernel.h.

bool itk::OpenCLKernel::m_DoubleAsFloat
private

Definition at line 727 of file itkOpenCLKernel.h.

cl_kernel itk::OpenCLKernel::m_KernelId
private

Definition at line 726 of file itkOpenCLKernel.h.



Generated on 04-09-2015 for elastix by doxygen 1.8.9.1 elastix logo