Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Makevars.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## This file is processed by configure to generate Makevars
## It includes GPU backend configuration (OpenCL, CUDA) and other settings

PKG_CPPFLAGS = -I../inst/include
PKG_CPPFLAGS = -I../inst/include -DCL_TARGET_OPENCL_VERSION=300
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The OpenCL version is set to 300 (OpenCL 3.0), which is higher than the package's documented minimum requirement of OpenCL 1.2 (stated in both DESCRIPTION and README.md). This could break compatibility with systems that have OpenCL versions 1.2-2.2 installed.

The value should be set to 120 to match the minimum requirement:

PKG_CPPFLAGS = -I../inst/include -DCL_TARGET_OPENCL_VERSION=120

Note: In OpenCL versioning, the macro value format is: major * 100 + minor * 10, so 120 = OpenCL 1.2, 300 = OpenCL 3.0.

Suggested change
PKG_CPPFLAGS = -I../inst/include -DCL_TARGET_OPENCL_VERSION=300
PKG_CPPFLAGS = -I../inst/include -DCL_TARGET_OPENCL_VERSION=120

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eddelbuettel we need to target v1.2 since the version of OpenCL supported on macOS is 1.2 (November 14, 2012!!!) due to Apple deprecating it in favor of Metal.

https://developer.apple.com/opencl/

If needed, I'm happy to move toward newer headers released by khronos.org/registry/OpenCL/

https://formulae.brew.sh/formula/opencl-headers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about a peace offering? If we are on that special OS identifying after a long-dead biologist we use 120 else we default to 300? Would that be viable?


## Compiler flags from configure
PKG_CXXFLAGS = @BANDICOOT_CXXFLAGS@ @OPENMP_CXXFLAGS@
Expand Down