OpenCL for MagickTransformImageColorspace and MagickScaleImage?

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
mercatore
Posts: 6
Joined: 2015-04-03T09:03:20-07:00
Authentication code: 6789

OpenCL for MagickTransformImageColorspace and MagickScaleImage?

Post by mercatore » 2015-04-11T07:29:05-07:00

Good afternoon,
I am using MagickWand in a C program, namely

Code: Select all

MagickTransformImageColorspace(wand, GRAYColorspace);
MagickScaleImage(wand,DHASH_WIDTH,DHASH_HEIGHT);
Have two challenges I'd really appreciate help:
- Are diese two capable of using OpenCL? I cannot find a definite answer (I understand the resize command from the command line interface would use OpenCL).
- How do I check if OpenCL is actually in the library of my Mac / used? I have looked at http://www.imagemagick.org/script/opencl.php and tried to call

Code: Select all

cl_device_id selectedDevice;  // OpenCL device used by ImageMagick
InitImageMagickOpenCL(MAGICK_OPENCL_DEVICE_SELECT_AUTO, NULL, (void*)&selectedDevice, exception);
as advertised but cl_device_id is said to be undefined. Which .h files would I have to include and what library to link when using gcc?

Thanks for your help,
Mercator

User avatar
fmw42
Posts: 25112
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: OpenCL for MagickTransformImageColorspace and MagickScaleImage?

Post by fmw42 » 2015-04-11T10:44:59-07:00

If

convert -version

lists OpenCL, then your Mac is capable of using it. Though I am not an expert on that.

The list of OpenCL enabled functions is at http://www.imagemagick.org/script/opencl.php

Post Reply