106 Q_ENUM( HardwareType )
115 Name = CL_DEVICE_NAME,
116 Vendor = CL_DEVICE_VENDOR,
117 Version = CL_DEVICE_VERSION,
118 Profile = CL_DEVICE_PROFILE,
119 ImageSupport = CL_DEVICE_IMAGE_SUPPORT,
120 Image2dMaxWidth = CL_DEVICE_IMAGE2D_MAX_WIDTH,
121 Image2dMaxHeight = CL_DEVICE_IMAGE2D_MAX_HEIGHT,
122 MaxMemAllocSize = CL_DEVICE_MAX_MEM_ALLOC_SIZE,
123 Type = CL_DEVICE_TYPE
135 static bool available();
138 static bool enabled();
141 static const std::vector<cl::Device> devices();
150 static cl::Device activeDevice( );
157 static QString activePlatformVersion( );
160 static void storePreferredDevice(
const QString deviceId );
163 static QString preferredDevice( );
166 static QString deviceId(
const cl::Device device );
171 static QString deviceDescription(
const cl::Device device );
176 static QString deviceDescription(
const QString deviceId );
179 static void setEnabled(
bool enabled );
182 static QString buildLog( cl::BuildError &error );
185 static QString sourceFromPath(
const QString &path );
188 static QString sourceFromBaseName(
const QString &baseName );
194 static QString errorText(
const int errorCode );
202 static cl::CommandQueue commandQueue();
210 Q_DECL_DEPRECATED
static cl::Program buildProgram(
const cl::Context &context,
const QString &source,
ExceptionBehavior exceptionBehavior = Catch );
216 static cl::Program buildProgram(
const QString &source,
ExceptionBehavior exceptionBehavior = Catch );
226 static cl::Context context();
229 static QString sourcePath();
232 static void setSourcePath(
const QString &value );
235 static QString activeDeviceInfo(
const Info infoType = Info::Name );
238 static QString deviceInfo(
const Info infoType, cl::Device device );
244 template <
typename T>
250 explicit CPLAllocator(
unsigned long size ): mMem( static_cast<T *>( CPLMalloc( sizeof( T ) * size ) ) ) { }
254 CPLFree(
static_cast<void *
>( mMem ) );
260 CPLFree(
static_cast<void *
>( mMem ) );
266 reset(
static_cast<T *
>( CPLMalloc(
sizeof( T ) *size ) ) );
315 static bool activate(
const QString &preferredDeviceId = QString() );
317 static bool activateInternal(
const QString &preferredDeviceId );
324 static bool sAvailable;
325 static QLatin1String SETTINGS_GLOBAL_ENABLED_KEY;
326 static QLatin1String SETTINGS_DEFAULT_DEVICE_KEY;
QgsMargins operator*(const QgsMargins &margins, double factor)
Returns a QgsMargins object that is formed by multiplying each component of the given margins by fact...