#include <itkOpenCLSize.h>
The OpenCLSize class defines the size of an item of work for an OpenCL kernel.
OpenCL sizes may be single-dimensional, two-dimensional, or three-dimensional:
The OpenCLKernel class represents an executable entry point function in an OpenCL program.
void SetGlobalWorkSize(const OpenCLSize &size)
The OpenCLSize class defines the size of an item of work for an OpenCL kernel.
- See also
- OpenCLKernel
Definition at line 49 of file itkOpenCLSize.h.
◆ Self
◆ SizeType1D
◆ SizeType2D
◆ SizeType3D
◆ OpenCLSize() [1/8]
itk::OpenCLSize::OpenCLSize |
( |
const Null & |
| ) |
|
|
inline |
◆ OpenCLSize() [2/8]
itk::OpenCLSize::OpenCLSize |
( |
| ) |
|
|
inline |
Constructs a default size consisting of a single dimension with width set to 1.
Definition at line 72 of file itkOpenCLSize.h.
◆ OpenCLSize() [3/8]
itk::OpenCLSize::OpenCLSize |
( |
const std::vcl_size_t |
size | ) |
|
|
inline |
Constructs a single-dimensional size with width set to size. The height and depth will be set to 1.
Definition at line 78 of file itkOpenCLSize.h.
◆ OpenCLSize() [4/8]
itk::OpenCLSize::OpenCLSize |
( |
const std::vcl_size_t |
width, |
|
|
const std::vcl_size_t |
height |
|
) |
| |
|
inline |
Constructs a two-dimensional size of width, height. The depth will be set to 1.
Definition at line 84 of file itkOpenCLSize.h.
◆ OpenCLSize() [5/8]
itk::OpenCLSize::OpenCLSize |
( |
const std::vcl_size_t |
width, |
|
|
const std::vcl_size_t |
height, |
|
|
const std::vcl_size_t |
depth |
|
) |
| |
|
inline |
Constructs a three-dimensional size of width, height and depth.
Definition at line 89 of file itkOpenCLSize.h.
◆ OpenCLSize() [6/8]
itk::OpenCLSize::OpenCLSize |
( |
const SizeType1D & |
size | ) |
|
|
inline |
Constructs a single-dimensional size from one dimention itk::Size. The height and depth will be set to 1.
- See also
- itk::Size
Definition at line 96 of file itkOpenCLSize.h.
◆ OpenCLSize() [7/8]
itk::OpenCLSize::OpenCLSize |
( |
const SizeType2D & |
size | ) |
|
|
inline |
Constructs a two-dimensional size from two-dimention itk::Size. The depth will be set to 1.
- See also
- itk::Size
Definition at line 103 of file itkOpenCLSize.h.
◆ OpenCLSize() [8/8]
itk::OpenCLSize::OpenCLSize |
( |
const SizeType3D & |
size | ) |
|
|
inline |
Constructs a three-dimensional size from three-dimention itk::Size.
- See also
- itk::Size
Definition at line 109 of file itkOpenCLSize.h.
◆ GetDepth()
std::vcl_size_t itk::OpenCLSize::GetDepth |
( |
| ) |
const |
|
inline |
◆ GetDimension()
cl_uint itk::OpenCLSize::GetDimension |
( |
| ) |
const |
|
inline |
Returns the dimension for this size, 1, 2, or 3.
Definition at line 114 of file itkOpenCLSize.h.
◆ GetHeight()
std::vcl_size_t itk::OpenCLSize::GetHeight |
( |
| ) |
const |
|
inline |
◆ GetLocalWorkSize() [1/2]
Returns the best-fit local work size that evenly divides this work size and fits within the maximum work group size of device. This function is typically used to convert an arbitrary global work size on a OpenCLKernel into a compatible local work size.
◆ GetLocalWorkSize() [2/2]
static OpenCLSize itk::OpenCLSize::GetLocalWorkSize |
( |
const OpenCLSize & |
maxWorkItemSize, |
|
|
const std::vcl_size_t |
maxItemsPerGroup |
|
) |
| |
|
static |
Returns the best-fit local work size that evenly divides this work size and fits within the maximums defined by maxWorkItemSize and maxItemsPerGroup. This function is typically used to convert an arbitrary global work size on a OpenCLKernel into a compatible local work size.
◆ GetSizes()
const std::vcl_size_t * itk::OpenCLSize::GetSizes |
( |
| ) |
const |
|
inline |
Returns a const pointer to the size array within this object.
Definition at line 126 of file itkOpenCLSize.h.
◆ GetWidth()
std::vcl_size_t itk::OpenCLSize::GetWidth |
( |
| ) |
const |
|
inline |
◆ IsNull()
bool itk::OpenCLSize::IsNull |
( |
| ) |
const |
|
inline |
◆ IsZero()
bool itk::OpenCLSize::IsZero |
( |
| ) |
const |
Returns true if the elements are zero, otherwise returns false.
◆ operator=()
◆ operator[]() [1/2]
std::vcl_size_t & itk::OpenCLSize::operator[] |
( |
const std::vcl_size_t |
dim | ) |
|
|
inline |
Access an element of the size. Elements are numbered 0, ..., Dim-1. No bounds checking is performed.
Definition at line 133 of file itkOpenCLSize.h.
◆ operator[]() [2/2]
std::vcl_size_t itk::OpenCLSize::operator[] |
( |
const std::vcl_size_t |
dim | ) |
const |
|
inline |
Access an element of the size. Elements are numbered 0, ..., Dim-1. This version can only be an rvalue. No bounds checking is performed.
Definition at line 139 of file itkOpenCLSize.h.
◆ RoundTo()
Returns the result of rounding this work size up to a multiple of size.
◆ m_Dim
cl_uint itk::OpenCLSize::m_Dim |
|
private |
◆ m_Sizes
std::vcl_size_t itk::OpenCLSize::m_Sizes[3] |
|
private |
◆ null
const Null itk::OpenCLSize::null |
|
static |