@@ -236,9 +236,10 @@ BOOST_AUTO_TEST_CASE(get_info_specializations)
236236#ifdef BOOST_COMPUTE_CL_VERSION_2_1
237237BOOST_AUTO_TEST_CASE (get_host_timer)
238238{
239+ boost::compute::device device = boost::compute::system::default_device ();
240+
239241 REQUIRES_OPENCL_VERSION (2 , 1 );
240242
241- boost::compute::device device = boost::compute::system::default_device ();
242243 BOOST_CHECK (device.get_host_timer () != 0 );
243244
244245 #ifndef BOOST_COMPUTE_NO_HDR_CHRONO
@@ -254,9 +255,10 @@ BOOST_AUTO_TEST_CASE(get_host_timer)
254255
255256BOOST_AUTO_TEST_CASE (get_device_and_host_timer)
256257{
258+ boost::compute::device device = boost::compute::system::default_device ();
259+
257260 REQUIRES_OPENCL_VERSION (2 , 1 );
258261
259- boost::compute::device device = boost::compute::system::default_device ();
260262 typedef std::pair<boost::compute::ulong_, boost::compute::ulong_> dah_timer;
261263 dah_timer timer;
262264 BOOST_CHECK_NO_THROW (timer = device.get_device_and_host_timer ());
@@ -278,10 +280,10 @@ BOOST_AUTO_TEST_CASE(get_device_and_host_timer)
278280
279281BOOST_AUTO_TEST_CASE (get_info_opencl21_queries)
280282{
281- REQUIRES_OPENCL_VERSION (2 , 1 );
282-
283283 boost::compute::device device = boost::compute::system::default_device ();
284284
285+ REQUIRES_OPENCL_VERSION (2 , 1 );
286+
285287 BOOST_CHECK (!device.get_info <CL_DEVICE_IL_VERSION>().empty ());
286288 BOOST_CHECK (device.get_info <CL_DEVICE_MAX_NUM_SUB_GROUPS>() > 0 );
287289 BOOST_CHECK_NO_THROW (
0 commit comments