18#ifndef __itkOpenCLWorkSize_h
19#define __itkOpenCLWorkSize_h
65 { this->m_Sizes[ 0 ] = 0; this->m_Sizes[ 1 ] = 0; this->m_Sizes[ 2 ] = 0; }
68 bool IsNull()
const {
return m_Dim == 0; }
74 { this->m_Sizes[ 0 ] = 1; this->m_Sizes[ 1 ] = 1; this->m_Sizes[ 2 ] = 1; }
80 { this->m_Sizes[ 0 ] = size; this->m_Sizes[ 1 ] = 1; this->m_Sizes[ 2 ] = 1; }
84 OpenCLSize(
const std::size_t width,
const std::size_t height ) :
86 { this->m_Sizes[ 0 ] = width; this->m_Sizes[ 1 ] = height; this->m_Sizes[ 2 ] = 1; }
89 OpenCLSize(
const std::size_t width,
const std::size_t height,
const std::size_t depth ) :
91 { this->m_Sizes[ 0 ] = width; this->m_Sizes[ 1 ] = height; this->m_Sizes[ 2 ] = depth; }
98 { this->m_Sizes[ 0 ] = size[ 0 ]; this->m_Sizes[ 1 ] = 1; this->m_Sizes[ 2 ] = 1; }
105 { this->m_Sizes[ 0 ] = size[ 0 ]; this->m_Sizes[ 1 ] = size[ 1 ]; this->m_Sizes[ 2 ] = 1; }
111 { this->m_Sizes[ 0 ] = size[ 0 ]; this->m_Sizes[ 1 ] = size[ 1 ]; this->m_Sizes[ 2 ] = size[ 2 ]; }
117 std::size_t
GetWidth()
const {
return this->m_Sizes[ 0 ]; }
120 std::size_t
GetHeight()
const {
return this->m_Sizes[ 1 ]; }
123 std::size_t
GetDepth()
const {
return this->m_Sizes[ 2 ]; }
126 const std::size_t *
GetSizes()
const {
return this->m_Sizes; }
134 {
return this->m_Sizes[ dim ]; }
140 {
return this->m_Sizes[ dim ]; }
148 const std::size_t maxItemsPerGroup );
162 std::size_t m_Sizes[ 3 ];
174template<
typename charT,
typename traits >
176std::basic_ostream< charT, traits > &
177operator<<( std::basic_ostream< charT, traits > & strm,
184 strm <<
"OpenCLSize(null)";
188 strm <<
"OpenCLSize(" << size.
GetWidth() <<
')';
The OpenCLDevice class represents the collection of OpenCL devices to be used by the host.
The OpenCLSize class defines the size of an item of work for an OpenCL kernel.
const std::vcl_size_t * GetSizes() const
OpenCLSize(const SizeType2D &size)
OpenCLSize(const std::vcl_size_t width, const std::vcl_size_t height, const std::vcl_size_t depth)
OpenCLSize(const SizeType1D &size)
static OpenCLSize GetLocalWorkSize(const OpenCLDevice &device)
static OpenCLSize GetLocalWorkSize(const OpenCLSize &maxWorkItemSize, const std::vcl_size_t maxItemsPerGroup)
OpenCLSize(const std::vcl_size_t size)
OpenCLSize RoundTo(const OpenCLSize &size) const
OpenCLSize & operator=(const Null &)
std::vcl_size_t GetDepth() const
cl_uint GetDimension() const
std::vcl_size_t & operator[](const std::vcl_size_t dim)
OpenCLSize(const std::vcl_size_t width, const std::vcl_size_t height)
std::vcl_size_t GetHeight() const
OpenCLSize(const SizeType3D &size)
std::vcl_size_t operator[](const std::vcl_size_t dim) const
std::vcl_size_t GetWidth() const
bool ITKOpenCL_EXPORT operator==(const OpenCLCommandQueue &lhs, const OpenCLCommandQueue &rhs)
bool ITKOpenCL_EXPORT operator!=(const OpenCLCommandQueue &lhs, const OpenCLCommandQueue &rhs)
std::basic_ostream< charT, traits > & operator<<(std::basic_ostream< charT, traits > &strm, const OpenCLCommandQueue &queue)