We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2abda4e commit 4f59d0dCopy full SHA for 4f59d0d
librapid/bindings/generators/main.py
@@ -25,9 +25,18 @@
25
""").strip()
26
27
postBoilerplate = textwrap.dedent(f"""
28
+#if defined(LIBRAPID_HAS_OPENCL)
29
module.def("configureOpenCL", [](bool verbose, bool ask) {{
30
lrc::configureOpenCL(verbose, ask);
31
}}, py::arg("verbose") = false, py::arg("ask") = false);
32
+#else
33
+ module.def("configureOpenCL", [](bool verbose, bool ask) {{
34
+ throw std::runtime_error("OpenCL is not supported in this build "
35
+ "of LibRapid. Please ensure OpenCL is "
36
+ "installed on your system and reinstall "
37
+ "LibRapid from source.");
38
+ }}, py::arg("verbose") = false, py::arg("ask") = false);
39
+#endif
40
41
module.def("hasOpenCL", []() {{
42
#if defined(LIBRAPID_HAS_OPENCL)
0 commit comments