[QGIS-Developer] OpenCL and macOS
apasotti at gmail.com
Thu Aug 9 08:26:33 PDT 2018
On Thu, Aug 9, 2018 at 5:05 PM, Tom Elwertowski <telwertowski at comcast.net>
> The directory found by CMake (/System/Library/Frameworks/OpenCL.framework/Headers/)
> contains only .h files.
> The khronos site mentioned by Denis offers cl.hpp for v1 and cl2.hpp for
> v2. qgsopenclutils.h includes cl2.hpp.
> Should I download and try cl.hpp on my mac?
Sorry but I don't know if that will work (I'm not a mac user), what I know
is that you need cl2.hpp (note that this header supports 1.1 and 1.0) in
order to build QGIS with opencl support and you also need the opencl
library to link to.
Once you've built it, to actually run opencl stuff you need (one or more)
other runtime library that is hardware (intel, AMD, NVidia etc.) and system
dependent and it is dynamically loaded by opencl library.
> If it compiles, how can I test running it.
There are tests in the tests folder that you can build and run,
specifically: qgsninecellsfiltertest.cpp and qgsopenclutilstest.cpp
You can also open the QGIS options dialog and check under "Acceleration":
As you can see in the picture OpenCL supported version of that particular
library is 1.1
Let me know how it goes!
> On 8/9/18 10:12 AM, Denis Rouzaud wrote:
>> I think the issue is that there is no header installed on mac
>> Le jeu. 9 août 2018 à 16:06, Alessandro Pasotti <apasotti at gmail.com
>> <mailto:apasotti at gmail.com>> a écrit :
>> On Thu, Aug 9, 2018 at 3:54 PM, Tom Elwertowski
>> <telwertowski at comcast.net <mailto:telwertowski at comcast.net>> wrote:
>> Hi all,
>> A recent change added OpenCL. Compilation fails on macOS because
>> Apple provides v1.2 (macOS 10.13) while QGIS seems to require v2.
>> That's wierd: 1.1 is what should be required can you file a ticket
>> and provide full logs?
>> Adding a version to FIND_PACKAGE will fix the macOS compile and
>> not use OpenCL.
>> Apple has deprecated OpenCL in favor of its own Metal
>> technology. OpenCL will remain for macOS 10.14 (Mojave, fall
>> 2018) but may be removed after fall 2019.
>> For the future, either OpenCL must remain an optional QGIS
>> feature in order to support macOS or the API needs to be
>> abstracted so that macOS can use Metal while other OSs use OpenCL.
>> OpenCL is an optional feature and there is no plan to change that.
>> LinkedIn: https://www.linkedin.com/in/thomas-elwertowski-a0886032
>> QGIS-Developer mailing list
>> QGIS-Developer at lists.osgeo.org
>> <mailto:QGIS-Developer at lists.osgeo.org>
>> List info: https://lists.osgeo.org/mailma
>> Unsubscribe: https://lists.osgeo.org/mailma
>> -- Alessandro Pasotti
>> w3: www.itopen.it <http://www.itopen.it>
>> QGIS-Developer mailing list
>> QGIS-Developer at lists.osgeo.org <mailto:QGIS-Developer at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Denis Rouzaud
>> denis at opengis.ch <mailto:denis at opengis.ch>
>> +41 76 370 21 22
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the QGIS-Developer