File tree 2 files changed +21
-2
lines changed
2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -58,10 +58,24 @@ inline bool supports_image_samplers(const boost::compute::device &device)
58
58
return true ;
59
59
}
60
60
61
- // returns true if the device supports image samplers.
61
+ // returns true if the device supports clSetMemObjectDestructorCallback
62
62
inline bool supports_destructor_callback (const boost::compute::device &device)
63
63
{
64
- // clSetMemObjectDestructorCallback is unimplemented in POCL
64
+ // unimplemented in POCL
65
+ return !is_pocl_device (device);
66
+ }
67
+
68
+ // returns true if the device supports clCompileProgram
69
+ inline bool supports_compile_program (const boost::compute::device &device)
70
+ {
71
+ // unimplemented in POCL
72
+ return !is_pocl_device (device);
73
+ }
74
+
75
+ // returns true if the device supports clLinkProgram
76
+ inline bool supports_link_program (const boost::compute::device &device)
77
+ {
78
+ // unimplemented in POCL
65
79
return !is_pocl_device (device);
66
80
}
67
81
Original file line number Diff line number Diff line change 21
21
#include < boost/compute/program.hpp>
22
22
#include < boost/compute/utility/source.hpp>
23
23
24
+ #include " quirks.hpp"
24
25
#include " context_setup.hpp"
25
26
26
27
namespace compute = boost::compute;
@@ -142,6 +143,10 @@ BOOST_AUTO_TEST_CASE(compile_and_link)
142
143
{
143
144
REQUIRES_OPENCL_VERSION (1 ,2 );
144
145
146
+ if (!supports_compile_program (device) || !supports_link_program (device)) {
147
+ return ;
148
+ }
149
+
145
150
// create the library program
146
151
const char library_source[] = BOOST_COMPUTE_STRINGIZE_SOURCE (
147
152
// for some reason the apple opencl compilers complains if a prototype
You can’t perform that action at this time.
0 commit comments