diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2010-06-20 10:15:49 +1000 |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2010-06-20 10:16:02 +1000 |
commit | 7045dbb981f535346699c06bb77449e9070b9255 (patch) | |
tree | 091e0289f51cfc91488e713b2c09008b6ecc2cb6 /src/opencl/qcldevice.cpp | |
parent | 8c8bacd1ba2c3813316466c9067accc9f434cf81 (diff) |
Preferred half vector size device query.
Diffstat (limited to 'src/opencl/qcldevice.cpp')
-rw-r--r-- | src/opencl/qcldevice.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/opencl/qcldevice.cpp b/src/opencl/qcldevice.cpp index 956e25a..0a90b95 100644 --- a/src/opencl/qcldevice.cpp +++ b/src/opencl/qcldevice.cpp @@ -534,6 +534,22 @@ int QCLDevice::preferredDoubleVectorSize() const } /*! + Returns the preferred size for vectors of type \c{half} + in the device. For example, 2 indicates that 2 \c{half} + values can be packed into a vector and operated on as a + unit for optimal performance. + + Returns zero if the device does not support \c{half}, + or the device does not support OpenCL 1.1. + + \sa hasHalfFloat() +*/ +int QCLDevice::preferredHalfFloatVectorSize() const +{ + return qt_cl_paramInt(m_id, CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF); +} + +/*! \enum QCLDevice::FloatCapability This enum defines the floating-point capabilities of the \c{float} or \c{double} type on an OpenCL device. |