#include <DimensionVector.h>
Class which holds information about either global or local thread size of a single kernel.
◆ DimensionVector() [1/5]
| ktt::DimensionVector::DimensionVector |
( |
| ) |
|
Default constructor, creates dimension vector with thread sizes in all dimensions set to 1.
◆ DimensionVector() [2/5]
| ktt::DimensionVector::DimensionVector |
( |
const size_t |
sizeX | ) |
|
|
explicit |
Constructor which creates dimension vector with specified thread size in dimension x and thread sizes in other dimensions set to 1.
- Parameters
-
| sizeX | Thread size in dimension x. |
◆ DimensionVector() [3/5]
| ktt::DimensionVector::DimensionVector |
( |
const size_t |
sizeX, |
|
|
const size_t |
sizeY |
|
) |
| |
|
explicit |
Constructor which creates dimension vector with specified thread sizes in dimensions x and y and thread size in dimension z set to 1.
- Parameters
-
| sizeX | Thread size in dimension x. |
| sizeY | Thread size in dimension y. |
◆ DimensionVector() [4/5]
| ktt::DimensionVector::DimensionVector |
( |
const size_t |
sizeX, |
|
|
const size_t |
sizeY, |
|
|
const size_t |
sizeZ |
|
) |
| |
|
explicit |
Constructor which creates dimension vector with specified thread sizes in all dimensions.
- Parameters
-
| sizeX | Thread size in dimension x. |
| sizeY | Thread size in dimension y. |
| sizeZ | Thread size in dimension z. |
◆ DimensionVector() [5/5]
| ktt::DimensionVector::DimensionVector |
( |
const std::vector< size_t > & |
vector | ) |
|
|
explicit |
Constructor which creates dimension vector with thread sizes based on up to first three elements of provided vector. If size of vector is less than 3, remaining thread sizes are set to 1.
- Parameters
-
| vector | Source vector for dimension vector thread sizes. |
◆ Divide()
Divides thread sizes by values provided by specified dimension vector.
- Parameters
-
| divisor | Source of values for thread size division. |
◆ GetSize()
| size_t ktt::DimensionVector::GetSize |
( |
const ModifierDimension |
modifierDimension | ) |
const |
Getter for thread size in specified dimension.
- Parameters
-
| modifierDimension | Specifies which dimension size will be returned. |
- Returns
- Thread size in specified dimension.
◆ GetSizeX()
| size_t ktt::DimensionVector::GetSizeX |
( |
| ) |
const |
Getter for thread size in dimension x.
- Returns
- Thread size in dimension x.
◆ GetSizeY()
| size_t ktt::DimensionVector::GetSizeY |
( |
| ) |
const |
Getter for thread size in dimension y.
- Returns
- Thread size in dimension y.
◆ GetSizeZ()
| size_t ktt::DimensionVector::GetSizeZ |
( |
| ) |
const |
Getter for thread size in dimension z.
- Returns
- Thread size in dimension z.
◆ GetString()
| std::string ktt::DimensionVector::GetString |
( |
| ) |
const |
Converts dimension vector to string.
- Returns
- String in format "(x, y, z)".
◆ GetTotalSize()
| size_t ktt::DimensionVector::GetTotalSize |
( |
| ) |
const |
Getter for total thread size. Total thread size is calculated by multiplying thread sizes in each dimension.
- Returns
- Total thread size.
◆ GetVector()
| std::vector< size_t > ktt::DimensionVector::GetVector |
( |
| ) |
const |
Converts dimension vector to STL vector. Resulting vector will always contain 3 elements.
- Returns
- Converted STL vector.
◆ ModifyByValue()
Modifies thread size in single dimension based on provided value and action.
- Parameters
-
| value | Value which will be used to modify thread size in single dimension based on specified action. |
| modifierAction | Specifies which operation should be performed with thread size and specified value. |
| modifierDimension | Specifies which dimension will be affected by the action. |
◆ Multiply()
Multiplies thread sizes by values provided by specified dimension vector.
- Parameters
-
| factor | Source of values for thread size multiplication. |
◆ operator!=()
| bool ktt::DimensionVector::operator!= |
( |
const DimensionVector & |
other | ) |
const |
Comparison operator for dimension vector. Compares thread sizes in all 3 dimensions.
- Returns
- True if dimension vectors are not equal. False otherwise.
◆ operator==()
| bool ktt::DimensionVector::operator== |
( |
const DimensionVector & |
other | ) |
const |
Comparison operator for dimension vector. Compares thread sizes in all 3 dimensions.
- Returns
- True if dimension vectors are equal. False otherwise.
◆ RoundUp()
Rounds up thread sizes to be multiple of values provided by specified dimension vector.
- Parameters
-
| multiple | Source of values for thread size round up. |
◆ SetSize()
| void ktt::DimensionVector::SetSize |
( |
const ModifierDimension |
modifierDimension, |
|
|
const size_t |
size |
|
) |
| |
Setter for thread size in specified dimension.
- Parameters
-
| modifierDimension | Specifies which dimension size will be set. |
| size | Thread size in specified dimension. |
◆ SetSizeX()
| void ktt::DimensionVector::SetSizeX |
( |
const size_t |
sizeX | ) |
|
Setter for thread size in dimension x.
- Parameters
-
| sizeX | Thread size in dimension x. |
◆ SetSizeY()
| void ktt::DimensionVector::SetSizeY |
( |
const size_t |
sizeY | ) |
|
Setter for thread size in dimension y.
- Parameters
-
| sizeY | Thread size in dimension y. |
◆ SetSizeZ()
| void ktt::DimensionVector::SetSizeZ |
( |
const size_t |
sizeZ | ) |
|
Setter for thread size in dimension z.
- Parameters
-
| sizeZ | Thread size in dimension z. |
The documentation for this class was generated from the following file: