Re: [QGIS-Developer] OpenCL and macOS

2018-08-10 Thread Tom Elwertowski
For macOS, copying cl2.hpp from 
https://github.com/KhronosGroup/OpenCL-CLHPP/releases to 
/usr/local/include/CL works.


Setting USE_OPENCL=OFF also works to disable OpenCL.

One or the other is necessary or macOS will try the use the v1.2 C 
headers provided by Apple and pointed to by OpenCL_INCLUDE_DIR.


After lanuching QGIS, I see the Options|Acceleration panel with three 
choices:

Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz
HD Graphics 4000
GeForce GT 650M

To automate the mac build, my suggestion is to create a 
OpenCL_HPP_INCLUDE_DIR variable. If a mac user sets it, use OpenCL; if 
not, don't use OpenCL. For other platforms, OpenCL_HPP_INCLUDE_DIR is 
automatically set to OpenCL_INCLUDE_DIR.


Tom

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] OpenCL and macOS

2018-08-09 Thread Alessandro Pasotti
On Thu, Aug 9, 2018 at 5:05 PM, Tom Elwertowski 
wrote:

> 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":
see
https://user-images.githubusercontent.com/142164/43066104-08b6880e-8e64-11e8-8a46-103e368119e5.png

As you can see in the picture OpenCL supported version of that particular
library is 1.1


Let me know how it goes!




>
> Tom
>
>
> On 8/9/18 10:12 AM, Denis Rouzaud wrote:
>
>> I think the issue is that there is no header installed on mac
>> https://stackoverflow.com/a/23079478/1548052
>>
>> Le jeu. 9 août 2018 à 16:06, Alessandro Pasotti > > a écrit :
>>
>> On Thu, Aug 9, 2018 at 3:54 PM, Tom Elwertowski
>> mailto:telwertow...@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.
>>
>>
>>
>> Tom
>> LinkedIn: https://www.linkedin.com/in/thomas-elwertowski-a0886032
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org
>> 
>> List info: https://lists.osgeo.org/mailma
>> n/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailma
>> n/listinfo/qgis-developer
>>
>>
>>
>>
>> -- Alessandro Pasotti
>> w3: www.itopen.it 
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org > >
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>> --
>>
>> Denis Rouzaud
>> de...@opengis.ch 
>> +41 76 370 21 22
>>
>>
>>


-- 
Alessandro Pasotti
w3:   www.itopen.it
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] OpenCL and macOS

2018-08-09 Thread Tom Elwertowski
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? If it compiles, how can I 
test running it.


Tom


On 8/9/18 10:12 AM, Denis Rouzaud wrote:

I think the issue is that there is no header installed on mac
https://stackoverflow.com/a/23079478/1548052

Le jeu. 9 août 2018 à 16:06, Alessandro Pasotti > a écrit :


On Thu, Aug 9, 2018 at 3:54 PM, Tom Elwertowski
mailto:telwertow...@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.



Tom
LinkedIn: https://www.linkedin.com/in/thomas-elwertowski-a0886032
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org

List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 
Alessandro Pasotti

w3: www.itopen.it 
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org 
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

--

Denis Rouzaud
de...@opengis.ch 
+41 76 370 21 22



___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] OpenCL and macOS

2018-08-09 Thread Denis Rouzaud
I would just make it disable by default on mac for the moment.


Le jeu. 9 août 2018 à 16:12, Denis Rouzaud  a
écrit :

> I think the issue is that there is no header installed on mac
> https://stackoverflow.com/a/23079478/1548052
>
> Le jeu. 9 août 2018 à 16:06, Alessandro Pasotti  a
> écrit :
>
>> On Thu, Aug 9, 2018 at 3:54 PM, Tom Elwertowski > > 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.
>>
>>
>>
>>
>>>
>>> Tom
>>> LinkedIn: https://www.linkedin.com/in/thomas-elwertowski-a0886032
>>> ___
>>> QGIS-Developer mailing list
>>> QGIS-Developer@lists.osgeo.org
>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>>
>>
>>
>> --
>> Alessandro Pasotti
>> w3:   www.itopen.it
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
> --
>
> Denis Rouzaud
> de...@opengis.ch  
> +41 76 370 21 22
>
>
> --

Denis Rouzaud
de...@opengis.ch  
+41 76 370 21 22
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] OpenCL and macOS

2018-08-09 Thread Denis Rouzaud
I think the issue is that there is no header installed on mac
https://stackoverflow.com/a/23079478/1548052

Le jeu. 9 août 2018 à 16:06, Alessandro Pasotti  a
écrit :

> On Thu, Aug 9, 2018 at 3:54 PM, Tom Elwertowski 
> 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.
>
>
>
>
>>
>> Tom
>> LinkedIn: https://www.linkedin.com/in/thomas-elwertowski-a0886032
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>
>
> --
> Alessandro Pasotti
> w3:   www.itopen.it
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

-- 

Denis Rouzaud
de...@opengis.ch  
+41 76 370 21 22
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] OpenCL and macOS

2018-08-09 Thread Alessandro Pasotti
On Thu, Aug 9, 2018 at 3:54 PM, Tom Elwertowski 
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.




>
> Tom
> LinkedIn: https://www.linkedin.com/in/thomas-elwertowski-a0886032
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 
Alessandro Pasotti
w3:   www.itopen.it
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] OpenCL and macOS

2018-08-09 Thread Tom Elwertowski

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. 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.


Tom
LinkedIn: https://www.linkedin.com/in/thomas-elwertowski-a0886032
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer