Loading...
Searching...
No Matches
itkOpenCLKernel.h
Go to the documentation of this file.
/*=========================================================================
*
* Copyright UMC Utrecht and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef itkOpenCLKernel_h
#define itkOpenCLKernel_h
#include "itkOpenCL.h"
#include "itkOpenCLGlobal.h"
#include "itkOpenCLEvent.h"
#include "itkOpenCLSize.h"
#include "itkOpenCLMemoryObject.h"
#include "itkOpenCLSampler.h"
#include "itkOpenCLVector.h"
#include "itkIndex.h"
#include "itkPoint.h"
#include "itkVector.h"
#include "itkCovariantVector.h"
#include "itkMatrix.h"
namespace itk
{
// Defines for macro injections to reduce spoil code
#define OpenCLKernelSetArgMacroH(type) cl_int SetArg(const cl_uint index, const type value);
#define OpenCLKernelSetArgMacroCXX(type) \
cl_int OpenCLKernel::SetArg(const cl_uint index, const type value) \
{ \
return clSetKernelArg(this->m_KernelId, index, sizeof(value), (const void *)&value); \
}
#define OpenCLKernelSetArgsMacroH(type0, type1, type2, type3, type4) \
OpenCLKernelSetArgMacroH(type0) OpenCLKernelSetArgMacroH(type1) OpenCLKernelSetArgMacroH(type2) \
OpenCLKernelSetArgMacroH(type3) OpenCLKernelSetArgMacroH(type4)
#define OpenCLKernelSetArgsMacroCXX(type0, type1, type2, type3, type4) \
OpenCLKernelSetArgMacroCXX(type0) OpenCLKernelSetArgMacroCXX(type1) OpenCLKernelSetArgMacroCXX(type2) \
OpenCLKernelSetArgMacroCXX(type3) OpenCLKernelSetArgMacroCXX(type4)
// Forward declaration
class OpenCLContext;
class OpenCLProgram;
class OpenCLVectorBase;
class OpenCLDevice;
class OpenCLKernelPimpl; // OpenCLKernel private implementation idiom.
class ITKOpenCL_EXPORT OpenCLKernel
{
public:
using Self = OpenCLMemoryObject;
OpenCLKernel();
OpenCLKernel(OpenCLContext * context, const cl_kernel id);
OpenCLKernel(const OpenCLKernel & other);
~OpenCLKernel();
OpenCLKernel &
operator=(const OpenCLKernel & other);
bool
IsNull() const;
cl_kernel
GetKernelId() const;
OpenCLContext *
GetContext() const;
OpenCLProgram
GetProgram() const;
std::string
GetName() const;
std::size_t
GetNumberOfArguments() const;
OpenCLSize
GetCompileWorkGroupSize() const;
OpenCLSize
GetCompileWorkGroupSize(const OpenCLDevice & device) const;
void
SetGlobalWorkSize(const OpenCLSize & size);
OpenCLSize
GetGlobalWorkSize() const;
void
SetRoundedGlobalWorkSize(const OpenCLSize & size);
void
SetLocalWorkSize(const OpenCLSize & size);
void
SetGlobalWorkOffset(const OpenCLSize & offset);
OpenCLSize
GetGlobalWorkOffset() const;
OpenCLSize
GetLocalWorkSize() const;
OpenCLSize
GetBestLocalWorkSizeImage1D() const;
OpenCLSize
GetBestLocalWorkSizeImage2D() const;
OpenCLSize
GetBestLocalWorkSizeImage3D() const;
OpenCLSize
GetBestLocalWorkSizeImage(const std::size_t dimension) const;
size_t
GetPreferredWorkSizeMultiple() const;
void
SetDoubleAsFloat(const bool value)
{
this->m_DoubleAsFloat = value;
}
void
SetDoubleAsFloatEnable()
{
this->m_DoubleAsFloat = true;
}
void
SetDoubleAsFloatDisable()
{
this->m_DoubleAsFloat = false;
}
bool
GetDoubleAsFloatEnabled()
{
return this->m_DoubleAsFloat;
}
/*
template< typename T,
typename = typename std::enable_if<
std::is_scalar_v< T > || std::is_union_v< T > >::type >
cl_int SetArg( const cl_uint index, const T value )
{
return clSetKernelArg( this->m_KernelId, index,
sizeof( value ), (const void *)&value );
}
*/
OpenCLKernelSetArgsMacroH(cl_uchar, cl_uchar2, cl_uchar4, cl_uchar8, cl_uchar16)
OpenCLKernelSetArgsMacroH(cl_char, cl_char2, cl_char4, cl_char8, cl_char16)
OpenCLKernelSetArgsMacroH(cl_ushort, cl_ushort2, cl_ushort4, cl_ushort8, cl_ushort16)
OpenCLKernelSetArgsMacroH(cl_short, cl_short2, cl_short4, cl_short8, cl_short16)
OpenCLKernelSetArgsMacroH(cl_uint, cl_uint2, cl_uint4, cl_uint8, cl_uint16)
OpenCLKernelSetArgsMacroH(cl_int, cl_int2, cl_int4, cl_int8, cl_int16)
OpenCLKernelSetArgsMacroH(cl_ulong, cl_ulong2, cl_ulong4, cl_ulong8, cl_ulong16)
OpenCLKernelSetArgsMacroH(cl_long, cl_long2, cl_long4, cl_long8, cl_long16)
OpenCLKernelSetArgsMacroH(cl_float, cl_float2, cl_float4, cl_float8, cl_float16)
OpenCLKernelSetArgsMacroH(cl_double, cl_double2, cl_double4, cl_double8, cl_double16)
cl_int SetArg(const cl_uint index, const void * data, const size_t size);
using Size1DType = Size<1>;
cl_int
SetArg(const cl_uint index, const Size1DType & value);
using Size2DType = Size<2>;
cl_int
SetArg(const cl_uint index, const Size2DType & value);
using Size3DType = Size<3>;
cl_int
SetArg(const cl_uint index, const Size3DType & value);
using Size4DType = Size<4>;
cl_int
SetArg(const cl_uint index, const Size4DType & value);
using Index1DType = Index<1>;
cl_int
SetArg(const cl_uint index, const Index1DType & value);
using Index2DType = Index<2>;
cl_int
SetArg(const cl_uint index, const Index2DType & value);
using Index3DType = Index<3>;
cl_int
SetArg(const cl_uint index, const Index3DType & value);
using Index4DType = Index<4>;
cl_int
SetArg(const cl_uint index, const Index4DType & value);
using Offset1DType = Offset<1>;
cl_int
SetArg(const cl_uint index, const Offset1DType & value);
using Offset2DType = Offset<2>;
cl_int
SetArg(const cl_uint index, const Offset2DType & value);
using Offset3DType = Offset<3>;
cl_int
SetArg(const cl_uint index, const Offset3DType & value);
using Offset4DType = Offset<4>;
cl_int
SetArg(const cl_uint index, const Offset4DType & value);
using PointInt1DType = Point<int, 1>;
cl_int
SetArg(const cl_uint index, const PointInt1DType & value);
using PointFloat1DType = Point<float, 1>;
cl_int
SetArg(const cl_uint index, const PointFloat1DType & value);
using PointDouble1DType = Point<double, 1>;
cl_int
SetArg(const cl_uint index, const PointDouble1DType & value);
using PointInt2DType = Point<int, 2>;
cl_int
SetArg(const cl_uint index, const PointInt2DType & value);
using PointFloat2DType = Point<float, 2>;
cl_int
SetArg(const cl_uint index, const PointFloat2DType & value);
using PointDouble2DType = Point<double, 2>;
cl_int
SetArg(const cl_uint index, const PointDouble2DType & value);
using PointInt3DType = Point<int, 3>;
cl_int
SetArg(const cl_uint index, const PointInt3DType & value);
using PointFloat3DType = Point<float, 3>;
cl_int
SetArg(const cl_uint index, const PointFloat3DType & value);
using PointDouble3DType = Point<double, 3>;
cl_int
SetArg(const cl_uint index, const PointDouble3DType & value);
using PointInt4DType = Point<int, 4>;
cl_int
SetArg(const cl_uint index, const PointInt4DType & value);
using PointFloat4DType = Point<float, 4>;
cl_int
SetArg(const cl_uint index, const PointFloat4DType & value);
using PointDouble4DType = Point<double, 4>;
cl_int
SetArg(const cl_uint index, const PointDouble4DType & value);
using VectorInt1DType = Vector<int, 1>;
cl_int
SetArg(const cl_uint index, const VectorInt1DType & value);
using VectorFloat1DType = Vector<float, 1>;
cl_int
SetArg(const cl_uint index, const VectorFloat1DType & value);
using VectorDouble1DType = Vector<double, 1>;
cl_int
SetArg(const cl_uint index, const VectorDouble1DType & value);
using VectorInt2DType = Vector<int, 2>;
cl_int
SetArg(const cl_uint index, const VectorInt2DType & value);
using VectorFloat2DType = Vector<float, 2>;
cl_int
SetArg(const cl_uint index, const VectorFloat2DType & value);
using VectorDouble2DType = Vector<double, 2>;
cl_int
SetArg(const cl_uint index, const VectorDouble2DType & value);
using VectorInt3DType = Vector<int, 3>;
cl_int
SetArg(const cl_uint index, const VectorInt3DType & value);
using VectorFloat3DType = Vector<float, 3>;
cl_int
SetArg(const cl_uint index, const VectorFloat3DType & value);
using VectorDouble3DType = Vector<double, 3>;
cl_int
SetArg(const cl_uint index, const VectorDouble3DType & value);
using VectorInt4DType = Vector<int, 4>;
cl_int
SetArg(const cl_uint index, const VectorInt4DType & value);
using VectorFloat4DType = Vector<float, 4>;
cl_int
SetArg(const cl_uint index, const VectorFloat4DType & value);
using VectorDouble4DType = Vector<double, 4>;
cl_int
SetArg(const cl_uint index, const VectorDouble4DType & value);
using CovariantVectorInt1DType = CovariantVector<int, 1>;
cl_int
SetArg(const cl_uint index, const CovariantVectorInt1DType & value);
using CovariantVectorFloat1DType = CovariantVector<float, 1>;
cl_int
SetArg(const cl_uint index, const CovariantVectorFloat1DType & value);
using CovariantVectorDouble1DType = CovariantVector<double, 1>;
cl_int
SetArg(const cl_uint index, const CovariantVectorDouble1DType & value);
using CovariantVectorInt2DType = CovariantVector<int, 2>;
cl_int
SetArg(const cl_uint index, const CovariantVectorInt2DType & value);
using CovariantVectorFloat2DType = CovariantVector<float, 2>;
cl_int
SetArg(const cl_uint index, const CovariantVectorFloat2DType & value);
using CovariantVectorDouble2DType = CovariantVector<double, 2>;
cl_int
SetArg(const cl_uint index, const CovariantVectorDouble2DType & value);
using CovariantVectorInt3DType = CovariantVector<int, 3>;
cl_int
SetArg(const cl_uint index, const CovariantVectorInt3DType & value);
using CovariantVectorFloat3DType = CovariantVector<float, 3>;
cl_int
SetArg(const cl_uint index, const CovariantVectorFloat3DType & value);
using CovariantVectorDouble3DType = CovariantVector<double, 3>;
cl_int
SetArg(const cl_uint index, const CovariantVectorDouble3DType & value);
using CovariantVectorInt4DType = CovariantVector<int, 4>;
cl_int
SetArg(const cl_uint index, const CovariantVectorInt4DType & value);
using CovariantVectorFloat4DType = CovariantVector<float, 4>;
cl_int
SetArg(const cl_uint index, const CovariantVectorFloat4DType & value);
using CovariantVectorDouble4DType = CovariantVector<double, 4>;
cl_int
SetArg(const cl_uint index, const CovariantVectorDouble4DType & value);
using MatrixFloat1x1Type = Matrix<float, 1, 1>;
cl_int
SetArg(const cl_uint index, const MatrixFloat1x1Type & value);
using MatrixDouble1x1Type = Matrix<double, 1, 1>;
cl_int
SetArg(const cl_uint index, const MatrixDouble1x1Type & value);
using MatrixFloat2x2Type = Matrix<float, 2, 2>;
cl_int
SetArg(const cl_uint index, const MatrixFloat2x2Type & value);
using MatrixDouble2x2Type = Matrix<double, 2, 2>;
cl_int
SetArg(const cl_uint index, const MatrixDouble2x2Type & value);
using MatrixFloat3x3Type = Matrix<float, 3, 3>;
cl_int
SetArg(const cl_uint index, const MatrixFloat3x3Type & value);
using MatrixDouble3x3Type = Matrix<double, 3, 3>;
cl_int
SetArg(const cl_uint index, const MatrixDouble3x3Type & value);
using MatrixFloat4x4Type = Matrix<float, 4, 4>;
cl_int
SetArg(const cl_uint index, const MatrixFloat4x4Type & value);
using MatrixDouble4x4Type = Matrix<double, 4, 4>;
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);
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);
inline OpenCLEvent
operator()()
{
return this->LaunchKernel();
}
template <typename T1>
inline OpenCLEvent
operator()(const T1 & arg1)
{
this->SetArg(0, arg1);
return this->LaunchKernel();
}
template <typename T1, typename T2>
inline OpenCLEvent
operator()(const T1 & arg1, const T2 & arg2)
{
this->SetArg(0, arg1);
this->SetArg(1, arg2);
return this->LaunchKernel();
}
template <typename T1, typename T2, typename T3>
inline OpenCLEvent
operator()(const T1 & arg1, const T2 & arg2, const T3 & arg3)
{
this->SetArg(0, arg1);
this->SetArg(1, arg2);
this->SetArg(2, arg3);
return this->LaunchKernel();
}
template <typename T1, typename T2, typename T3, typename T4>
inline OpenCLEvent
operator()(const T1 & arg1, const T2 & arg2, const T3 & arg3, const T4 & arg4)
{
this->SetArg(0, arg1);
this->SetArg(1, arg2);
this->SetArg(2, arg3);
this->SetArg(3, arg4);
return this->LaunchKernel();
}
template <typename T1, typename T2, typename T3, typename T4, typename T5>
inline OpenCLEvent
operator()(const T1 & arg1, const T2 & arg2, const T3 & arg3, const T4 & arg4, const T5 & arg5)
{
this->SetArg(0, arg1);
this->SetArg(1, arg2);
this->SetArg(2, arg3);
this->SetArg(3, arg4);
this->SetArg(4, arg5);
return this->LaunchKernel();
}
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
inline OpenCLEvent
operator()(const T1 & arg1, const T2 & arg2, const T3 & arg3, const T4 & arg4, const T5 & arg5, const T6 & arg6)
{
this->SetArg(0, arg1);
this->SetArg(1, arg2);
this->SetArg(2, arg3);
this->SetArg(3, arg4);
this->SetArg(4, arg5);
this->SetArg(5, arg6);
return this->LaunchKernel();
}
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
inline OpenCLEvent
operator()(const T1 & arg1,
const T2 & arg2,
const T3 & arg3,
const T4 & arg4,
const T5 & arg5,
const T6 & arg6,
const T7 & arg7)
{
this->SetArg(0, arg1);
this->SetArg(1, arg2);
this->SetArg(2, arg3);
this->SetArg(3, arg4);
this->SetArg(4, arg5);
this->SetArg(5, arg6);
this->SetArg(6, arg7);
return this->LaunchKernel();
}
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
inline 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)
{
this->SetArg(0, arg1);
this->SetArg(1, arg2);
this->SetArg(2, arg3);
this->SetArg(3, arg4);
this->SetArg(4, arg5);
this->SetArg(5, arg6);
this->SetArg(6, arg7);
this->SetArg(7, arg8);
return this->LaunchKernel();
}
template <typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8,
typename T9>
inline 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)
{
this->SetArg(0, arg1);
this->SetArg(1, arg2);
this->SetArg(2, arg3);
this->SetArg(3, arg4);
this->SetArg(4, arg5);
this->SetArg(5, arg6);
this->SetArg(6, arg7);
this->SetArg(7, arg8);
this->SetArg(8, arg9);
return this->LaunchKernel();
}
template <typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8,
typename T9,
typename T10>
inline 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)
{
this->SetArg(0, arg1);
this->SetArg(1, arg2);
this->SetArg(2, arg3);
this->SetArg(3, arg4);
this->SetArg(4, arg5);
this->SetArg(5, arg6);
this->SetArg(6, arg7);
this->SetArg(7, arg8);
this->SetArg(8, arg9);
this->SetArg(9, arg10);
return this->LaunchKernel();
}
private:
std::unique_ptr<OpenCLKernelPimpl> d_ptr;
cl_kernel m_KernelId;
bool m_DoubleAsFloat;
ITK_OPENCL_DECLARE_PRIVATE(OpenCLKernel)
};
bool ITKOpenCL_EXPORT
operator==(const OpenCLKernel & lhs, const OpenCLKernel & rhs);
bool ITKOpenCL_EXPORT
operator!=(const OpenCLKernel & lhs, const OpenCLKernel & rhs);
template <typename charT, typename traits>
inline std::basic_ostream<charT, traits> &
operator<<(std::basic_ostream<charT, traits> & strm, const OpenCLKernel & kernel)
{
if (kernel.IsNull())
{
strm << "OpenCLKernel(null)";
return strm;
}
const char indent = ' ';
strm << "OpenCLKernel\n"
<< indent << "Id: " << kernel.GetKernelId() << '\n'
<< indent << "Name: " << kernel.GetName() << '\n'
<< indent << "Number of arguments: " << kernel.GetNumberOfArguments() << '\n'
<< indent << "Global work size: " << kernel.GetGlobalWorkSize() << '\n'
<< indent << "Local work size: " << kernel.GetLocalWorkSize() << '\n'
<< indent << "Global work offset: " << kernel.GetGlobalWorkOffset() << '\n'
<< indent << "Compile work group size: " << kernel.GetCompileWorkGroupSize() << '\n'
<< indent << "Best local work size image 2D: " << kernel.GetBestLocalWorkSizeImage2D() << '\n'
<< indent << "Best local work size image 3D: " << kernel.GetBestLocalWorkSizeImage3D() << '\n'
<< indent << "Preferred work size multiple: " << kernel.GetPreferredWorkSizeMultiple() << std::endl;
return strm;
}
} // end namespace itk
#endif /* itkOpenCLKernel_h */
itk::OpenCLContext
The OpenCLContext class represents an OpenCL context.
Definition itkOpenCLContext.h:77
itk::OpenCLDevice
The OpenCLDevice class represents the collection of OpenCL devices to be used by the host.
Definition itkOpenCLDevice.h:59
itk::OpenCLEventList
OpenCLEventList class represents a list of OpenCLEvent objects.
Definition itkOpenCLEventList.h:33
itk::OpenCLEvent
OpenCLEvent class represents an OpenCL event object.
Definition itkOpenCLEvent.h:93
itk::OpenCLKernel
The OpenCLKernel class represents an executable entry point function in an OpenCL program.
Definition itkOpenCLKernel.h:136
itk::OpenCLKernel::MatrixDouble3x3Type
Matrix< double, 3, 3 > MatrixDouble3x3Type
Definition itkOpenCLKernel.h:558
itk::OpenCLKernel::PointInt1DType
Point< int, 1 > PointInt1DType
Definition itkOpenCLKernel.h:390
itk::OpenCLKernel::PointInt2DType
Point< int, 2 > PointInt2DType
Definition itkOpenCLKernel.h:402
itk::OpenCLKernel::Size1DType
Size< 1 > Size1DType
Definition itkOpenCLKernel.h:339
itk::OpenCLKernel::VectorInt3DType
Vector< int, 3 > VectorInt3DType
Definition itkOpenCLKernel.h:464
itk::OpenCLKernel::GetBestLocalWorkSizeImage3D
OpenCLSize GetBestLocalWorkSizeImage3D() const
itk::OpenCLKernel::SetGlobalWorkSize
void SetGlobalWorkSize(const OpenCLSize &size)
itk::OpenCLKernel::MatrixFloat4x4Type
Matrix< float, 4, 4 > MatrixFloat4x4Type
Definition itkOpenCLKernel.h:562
itk::OpenCLKernel::IsNull
bool IsNull() const
itk::OpenCLKernel::SetRoundedGlobalWorkSize
void SetRoundedGlobalWorkSize(const OpenCLSize &size)
itk::OpenCLKernel::SetDoubleAsFloat
void SetDoubleAsFloat(const bool value)
Definition itkOpenCLKernel.h:280
itk::OpenCLKernel::cl_short8
cl_char16 cl_short8
Definition itkOpenCLKernel.h:327
itk::OpenCLKernel::operator()
OpenCLEvent operator()(const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6)
Definition itkOpenCLKernel.h:719
itk::OpenCLKernel::cl_char2
cl_char2
Definition itkOpenCLKernel.h:325
itk::OpenCLKernel::CovariantVectorDouble3DType
CovariantVector< double, 3 > CovariantVectorDouble3DType
Definition itkOpenCLKernel.h:521
itk::OpenCLKernel::MatrixFloat2x2Type
Matrix< float, 2, 2 > MatrixFloat2x2Type
Definition itkOpenCLKernel.h:546
itk::OpenCLKernel::SetLocalWorkSize
void SetLocalWorkSize(const OpenCLSize &size)
itk::OpenCLKernel::VectorFloat2DType
Vector< float, 2 > VectorFloat2DType
Definition itkOpenCLKernel.h:456
itk::OpenCLKernel::GetNumberOfArguments
std::vcl_size_t GetNumberOfArguments() const
itk::OpenCLKernel::VectorInt2DType
Vector< int, 2 > VectorInt2DType
Definition itkOpenCLKernel.h:452
itk::OpenCLKernel::PointDouble2DType
Point< double, 2 > PointDouble2DType
Definition itkOpenCLKernel.h:410
itk::OpenCLKernel::GetBestLocalWorkSizeImage
OpenCLSize GetBestLocalWorkSizeImage(const std::vcl_size_t dimension) const
itk::OpenCLKernel::cl_int8
cl_char16 cl_short16 cl_int8
Definition itkOpenCLKernel.h:329
itk::OpenCLKernel::cl_double2
cl_char16 cl_short16 cl_int16 cl_long16 cl_double2
Definition itkOpenCLKernel.h:333
itk::OpenCLKernel::PointFloat4DType
Point< float, 4 > PointFloat4DType
Definition itkOpenCLKernel.h:430
itk::OpenCLKernel::cl_double4
cl_char16 cl_short16 cl_int16 cl_long16 cl_double4
Definition itkOpenCLKernel.h:333
itk::OpenCLKernel::CovariantVectorFloat4DType
CovariantVector< float, 4 > CovariantVectorFloat4DType
Definition itkOpenCLKernel.h:529
itk::OpenCLKernel::operator()
OpenCLEvent operator()(const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4)
Definition itkOpenCLKernel.h:688
itk::OpenCLKernel::operator=
OpenCLKernel & operator=(const OpenCLKernel &other)
itk::OpenCLKernel::CovariantVectorFloat3DType
CovariantVector< float, 3 > CovariantVectorFloat3DType
Definition itkOpenCLKernel.h:517
itk::OpenCLKernel::VectorInt1DType
Vector< int, 1 > VectorInt1DType
Definition itkOpenCLKernel.h:440
itk::OpenCLKernel::CovariantVectorInt3DType
CovariantVector< int, 3 > CovariantVectorInt3DType
Definition itkOpenCLKernel.h:513
itk::OpenCLKernel::GetLocalWorkSize
OpenCLSize GetLocalWorkSize() const
itk::OpenCLKernel::operator()
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)
Definition itkOpenCLKernel.h:795
itk::OpenCLKernel::Index2DType
Index< 2 > Index2DType
Definition itkOpenCLKernel.h:360
itk::OpenCLKernel::operator()
OpenCLEvent operator()(const T1 &arg1, const T2 &arg2)
Definition itkOpenCLKernel.h:661
itk::OpenCLKernel::cl_char4
cl_char4
Definition itkOpenCLKernel.h:325
itk::OpenCLKernel::OpenCLKernel
OpenCLKernel()
itk::OpenCLKernel::operator()
OpenCLEvent operator()(const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5)
Definition itkOpenCLKernel.h:703
itk::OpenCLKernel::cl_int4
cl_char16 cl_short16 cl_int4
Definition itkOpenCLKernel.h:329
itk::OpenCLKernel::VectorDouble1DType
Vector< double, 1 > VectorDouble1DType
Definition itkOpenCLKernel.h:448
itk::OpenCLKernel::GetBestLocalWorkSizeImage2D
OpenCLSize GetBestLocalWorkSizeImage2D() const
itk::OpenCLKernel::PointDouble3DType
Point< double, 3 > PointDouble3DType
Definition itkOpenCLKernel.h:422
itk::OpenCLKernel::Index4DType
Index< 4 > Index4DType
Definition itkOpenCLKernel.h:368
itk::OpenCLKernel::cl_short2
cl_char16 cl_short2
Definition itkOpenCLKernel.h:327
itk::OpenCLKernel::SetDoubleAsFloatDisable
void SetDoubleAsFloatDisable()
Definition itkOpenCLKernel.h:290
itk::OpenCLKernel::cl_long2
cl_char16 cl_short16 cl_int16 cl_long2
Definition itkOpenCLKernel.h:331
itk::OpenCLKernel::Offset2DType
Offset< 2 > Offset2DType
Definition itkOpenCLKernel.h:377
itk::OpenCLKernel::VectorInt4DType
Vector< int, 4 > VectorInt4DType
Definition itkOpenCLKernel.h:476
itk::OpenCLKernel::MatrixFloat1x1Type
Matrix< float, 1, 1 > MatrixFloat1x1Type
Definition itkOpenCLKernel.h:538
itk::OpenCLKernel::LaunchKernel
OpenCLEvent LaunchKernel()
itk::OpenCLKernel::Index3DType
Index< 3 > Index3DType
Definition itkOpenCLKernel.h:364
itk::OpenCLKernel::CovariantVectorFloat2DType
CovariantVector< float, 2 > CovariantVectorFloat2DType
Definition itkOpenCLKernel.h:505
itk::OpenCLKernel::CovariantVectorFloat1DType
CovariantVector< float, 1 > CovariantVectorFloat1DType
Definition itkOpenCLKernel.h:493
itk::OpenCLKernel::GetGlobalWorkOffset
OpenCLSize GetGlobalWorkOffset() const
itk::OpenCLKernel::CovariantVectorDouble2DType
CovariantVector< double, 2 > CovariantVectorDouble2DType
Definition itkOpenCLKernel.h:509
itk::OpenCLKernel::OpenCLKernel
OpenCLKernel(const OpenCLKernel &other)
itk::OpenCLKernel::CovariantVectorDouble1DType
CovariantVector< double, 1 > CovariantVectorDouble1DType
Definition itkOpenCLKernel.h:497
itk::OpenCLKernel::PointDouble4DType
Point< double, 4 > PointDouble4DType
Definition itkOpenCLKernel.h:434
itk::OpenCLKernel::Size3DType
Size< 3 > Size3DType
Definition itkOpenCLKernel.h:347
itk::OpenCLKernel::Offset1DType
Offset< 1 > Offset1DType
Definition itkOpenCLKernel.h:373
itk::OpenCLKernel::operator()
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)
Definition itkOpenCLKernel.h:833
itk::OpenCLKernel::PointInt4DType
Point< int, 4 > PointInt4DType
Definition itkOpenCLKernel.h:426
itk::OpenCLKernel::operator()
OpenCLEvent operator()(const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7)
Definition itkOpenCLKernel.h:736
itk::OpenCLKernel::operator()
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)
Definition itkOpenCLKernel.h:760
itk::OpenCLKernel::MatrixDouble1x1Type
Matrix< double, 1, 1 > MatrixDouble1x1Type
Definition itkOpenCLKernel.h:542
itk::OpenCLKernel::cl_int2
cl_char16 cl_short16 cl_int2
Definition itkOpenCLKernel.h:329
itk::OpenCLKernel::CovariantVectorInt4DType
CovariantVector< int, 4 > CovariantVectorInt4DType
Definition itkOpenCLKernel.h:525
itk::OpenCLKernel::Offset4DType
Offset< 4 > Offset4DType
Definition itkOpenCLKernel.h:385
itk::OpenCLKernel::GetGlobalWorkSize
OpenCLSize GetGlobalWorkSize() const
itk::OpenCLKernel::OpenCLKernelSetArgsMacroH
OpenCLKernelSetArgsMacroH(cl_uchar, cl_uchar2, cl_uchar4, cl_uchar8, cl_uchar16) OpenCLKernelSetArgsMacroH(cl_char
itk::OpenCLKernel::m_KernelId
cl_kernel m_KernelId
Definition itkOpenCLKernel.h:860
itk::OpenCLKernel::VectorDouble3DType
Vector< double, 3 > VectorDouble3DType
Definition itkOpenCLKernel.h:472
itk::OpenCLKernel::GetPreferredWorkSizeMultiple
vcl_size_t GetPreferredWorkSizeMultiple() const
itk::OpenCLKernel::PointFloat2DType
Point< float, 2 > PointFloat2DType
Definition itkOpenCLKernel.h:406
itk::OpenCLKernel::SetGlobalWorkOffset
void SetGlobalWorkOffset(const OpenCLSize &offset)
itk::OpenCLKernel::GetCompileWorkGroupSize
OpenCLSize GetCompileWorkGroupSize() const
itk::OpenCLKernel::cl_short4
cl_char16 cl_short4
Definition itkOpenCLKernel.h:327
itk::OpenCLKernel::VectorDouble2DType
Vector< double, 2 > VectorDouble2DType
Definition itkOpenCLKernel.h:460
itk::OpenCLKernel::GetProgram
OpenCLProgram GetProgram() const
itk::OpenCLKernel::cl_double8
cl_char16 cl_short16 cl_int16 cl_long16 cl_double8
Definition itkOpenCLKernel.h:333
itk::OpenCLKernel::operator()
OpenCLEvent operator()(const T1 &arg1, const T2 &arg2, const T3 &arg3)
Definition itkOpenCLKernel.h:674
itk::OpenCLKernel::Index1DType
Index< 1 > Index1DType
Definition itkOpenCLKernel.h:356
itk::OpenCLKernel::PointDouble1DType
Point< double, 1 > PointDouble1DType
Definition itkOpenCLKernel.h:398
itk::OpenCLKernel::GetDoubleAsFloatEnabled
bool GetDoubleAsFloatEnabled()
Definition itkOpenCLKernel.h:295
itk::OpenCLKernel::OpenCLKernel
OpenCLKernel(OpenCLContext *context, const cl_kernel id)
itk::OpenCLKernel::GetCompileWorkGroupSize
OpenCLSize GetCompileWorkGroupSize(const OpenCLDevice &device) const
itk::OpenCLKernel::SetArg
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)
itk::OpenCLKernel::PointFloat3DType
Point< float, 3 > PointFloat3DType
Definition itkOpenCLKernel.h:418
itk::OpenCLKernel::VectorFloat3DType
Vector< float, 3 > VectorFloat3DType
Definition itkOpenCLKernel.h:468
itk::OpenCLKernel::VectorDouble4DType
Vector< double, 4 > VectorDouble4DType
Definition itkOpenCLKernel.h:484
itk::OpenCLKernel::Size4DType
Size< 4 > Size4DType
Definition itkOpenCLKernel.h:351
itk::OpenCLKernel::d_ptr
std::unique_ptr< OpenCLKernelPimpl > d_ptr
Definition itkOpenCLKernel.h:859
itk::OpenCLKernel::~OpenCLKernel
~OpenCLKernel()
itk::OpenCLKernel::GetContext
OpenCLContext * GetContext() const
itk::OpenCLKernel::LaunchTaskAsync
OpenCLEvent LaunchTaskAsync(const OpenCLEventList &event_list)
itk::OpenCLKernel::operator()
OpenCLEvent operator()(const T1 &arg1)
Definition itkOpenCLKernel.h:649
itk::OpenCLKernel::PointInt3DType
Point< int, 3 > PointInt3DType
Definition itkOpenCLKernel.h:414
itk::OpenCLKernel::GetName
std::string GetName() const
itk::OpenCLKernel::Self
OpenCLMemoryObject Self
Definition itkOpenCLKernel.h:139
itk::OpenCLKernel::GetBestLocalWorkSizeImage1D
OpenCLSize GetBestLocalWorkSizeImage1D() const
itk::OpenCLKernel::cl_long8
cl_char16 cl_short16 cl_int16 cl_long8
Definition itkOpenCLKernel.h:331
itk::OpenCLKernel::MatrixDouble4x4Type
Matrix< double, 4, 4 > MatrixDouble4x4Type
Definition itkOpenCLKernel.h:566
itk::OpenCLKernel::CovariantVectorInt2DType
CovariantVector< int, 2 > CovariantVectorInt2DType
Definition itkOpenCLKernel.h:501
itk::OpenCLKernel::CovariantVectorDouble4DType
CovariantVector< double, 4 > CovariantVectorDouble4DType
Definition itkOpenCLKernel.h:533
itk::OpenCLKernel::cl_char8
cl_char8
Definition itkOpenCLKernel.h:325
itk::OpenCLKernel::GetKernelId
cl_kernel GetKernelId() const
itk::OpenCLKernel::CovariantVectorInt1DType
CovariantVector< int, 1 > CovariantVectorInt1DType
Definition itkOpenCLKernel.h:489
itk::OpenCLKernel::Size2DType
Size< 2 > Size2DType
Definition itkOpenCLKernel.h:343
itk::OpenCLKernel::PointFloat1DType
Point< float, 1 > PointFloat1DType
Definition itkOpenCLKernel.h:394
itk::OpenCLKernel::cl_long4
cl_char16 cl_short16 cl_int16 cl_long4
Definition itkOpenCLKernel.h:331
itk::OpenCLKernel::VectorFloat4DType
Vector< float, 4 > VectorFloat4DType
Definition itkOpenCLKernel.h:480
itk::OpenCLKernel::MatrixFloat3x3Type
Matrix< float, 3, 3 > MatrixFloat3x3Type
Definition itkOpenCLKernel.h:554
itk::OpenCLKernel::SetDoubleAsFloatEnable
void SetDoubleAsFloatEnable()
Definition itkOpenCLKernel.h:285
itk::OpenCLKernel::VectorFloat1DType
Vector< float, 1 > VectorFloat1DType
Definition itkOpenCLKernel.h:444
itk::OpenCLKernel::Offset3DType
Offset< 3 > Offset3DType
Definition itkOpenCLKernel.h:381
itk::OpenCLKernel::MatrixDouble2x2Type
Matrix< double, 2, 2 > MatrixDouble2x2Type
Definition itkOpenCLKernel.h:550
itk::OpenCLKernel::m_DoubleAsFloat
bool m_DoubleAsFloat
Definition itkOpenCLKernel.h:861
itk::OpenCLKernel::LaunchTask
bool LaunchTask(const OpenCLEventList &event_list)
itk::OpenCLMemoryObject
The OpenCLMemoryObject class represents all common memory objects such as buffers and image objects.
Definition itkOpenCLMemoryObject.h:39
itk::OpenCLProgram
The OpenCLProgram class represents an OpenCL program object.
Definition itkOpenCLProgram.h:38
itk::OpenCLSampler
The OpenCLSampler class represents an OpenCL sampler object.
Definition itkOpenCLSampler.h:72
itk::OpenCLSize
The OpenCLSize class defines the size of an item of work for an OpenCL kernel.
Definition itkOpenCLSize.h:50
itk::OpenCLVectorBase
The base class for the OpenCLVector implementation.
Definition itkOpenCLVectorBase.h:38
itkOpenCLEvent.h
ITKOpenCL_EXPORT
#define ITKOpenCL_EXPORT
Definition itkOpenCLExport.h:33
itkOpenCLGlobal.h
ITK_OPENCL_DECLARE_PRIVATE
#define ITK_OPENCL_DECLARE_PRIVATE(Class)
Definition itkOpenCLGlobal.h:38
itkOpenCLMemoryObject.h
itkOpenCLSampler.h
itkOpenCLSize.h
itkOpenCLVector.h
itkOpenCL.h
itk
Definition itkAdvancedImageToImageMetric.h:43
itk::operator==
bool ITKOpenCL_EXPORT operator==(const OpenCLCommandQueue &lhs, const OpenCLCommandQueue &rhs)
itk::operator!=
bool ITKOpenCL_EXPORT operator!=(const OpenCLCommandQueue &lhs, const OpenCLCommandQueue &rhs)
itk::operator<<
std::basic_ostream< charT, traits > & operator<<(std::basic_ostream< charT, traits > &strm, const OpenCLCommandQueue &queue)
Definition itkOpenCLCommandQueue.h:135

Generated on 1768596610 for elastix by 1.15.0 |