kenba/opencl3

Compile failure using CL_VERSION_2_2 feature due to unmarked unsafe function call in program.rs

Closed this issue · 1 comments

Including the "CL_VERSION_2_2" feature flag causes compilation to fail due to unmarked unsafe calls in the following functions in program.rs:

  • set_release_callback
  • set_specialization_constant

Steps to reproduce:

  • Create a new project cargo new opencl_test
  • Add the following to Cargo.toml:
[dependencies.opencl3]
version = "0.9.1"
features = ["CL_VERSION_2_1", "CL_VERSION_2_2", "CL_VERSION_3_0"]
  • Compile with cargo build

Making the functions or calls unsafe allows for compilation. Haven't made a pull as want to make sure this is the case.

kenba commented

This change has now been published in version 0.9.2 of the crate.