OCL-dev / ocl-icd

OpenCL ICD Loader (free software)
BSD 2-Clause "Simplified" License
76 stars 23 forks source link

C++ API headers? #22

Closed timsnyder closed 2 years ago

timsnyder commented 2 years ago

I notice that your library vendors the C headers from Khronos, would it make sense to also vendor the C++ API headers from https://github.com/KhronosGroup/OpenCL-CLHPP or are you intentionally avoiding that?

Kerilk commented 2 years ago

Hello,

Thanks for the interest. We do not, in fact, vendor those headers, and users shouldn't rely on those as a source of truth. Those headers are included in the project to ensure that, in the case where the system headers are found to be incompatible, the project can still fallback to using the provided headers. This is necessary because some part of the project are heavily version dependent. Nowadays, using a git sub-module would maybe make more sense, but this was not really a viable option when the project was started.

As far as I know, distribution maintainer rely on the official Khronos headers for packaging purposes, and only use our project to package our version of the OpenCL ICD loader.

Thus adding the C++ headers to the project would serve no purpose.

Don't hesitate if you have more questions.

timsnyder commented 2 years ago

Thanks for your answer to my question @Kerilk!

timsnyder commented 2 years ago

I see the --enable-official-khronos-headers option in your configure.ac that tells it to use the System headers and the C headers are then installed into whatever --prefix is specified. If your package doesn't use the C++ headers, I can understand why they aren't also copied over into --prefix. Thanks.