diff options
Diffstat (limited to 'src/opencl/qclkernel.h')
-rw-r--r-- | src/opencl/qclkernel.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/opencl/qclkernel.h b/src/opencl/qclkernel.h index b03676b..e886aa6 100644 --- a/src/opencl/qclkernel.h +++ b/src/opencl/qclkernel.h @@ -101,6 +101,10 @@ public: void setGlobalWorkSize(size_t width, size_t height); void setGlobalWorkSize(size_t width, size_t height, size_t depth); + void setRoundedGlobalWorkSize(const QCLWorkSize &size); + void setRoundedGlobalWorkSize(size_t width, size_t height); + void setRoundedGlobalWorkSize(size_t width, size_t height, size_t depth); + QCLWorkSize localWorkSize() const; void setLocalWorkSize(const QCLWorkSize &size); void setLocalWorkSize(size_t width, size_t height); @@ -298,6 +302,21 @@ inline void QCLKernel::setGlobalWorkSize(size_t width, size_t height, size_t dep setGlobalWorkSize(QCLWorkSize(width, height, depth)); } +inline void QCLKernel::setRoundedGlobalWorkSize(const QCLWorkSize &size) +{ + setGlobalWorkSize(size.roundTo(localWorkSize())); +} + +inline void QCLKernel::setRoundedGlobalWorkSize(size_t width, size_t height) +{ + setRoundedGlobalWorkSize(QCLWorkSize(width, height)); +} + +inline void QCLKernel::setRoundedGlobalWorkSize(size_t width, size_t height, size_t depth) +{ + setRoundedGlobalWorkSize(QCLWorkSize(width, height, depth)); +} + inline void QCLKernel::setLocalWorkSize(size_t width, size_t height) { setLocalWorkSize(QCLWorkSize(width, height)); |