mirror of
https://github.com/boostorg/compute.git
synced 2026-01-27 18:52:15 +00:00
Global setup for OpenCL context in tests
refs kylelutz/compute#9 device, context, and queue are initialized statically in `context_setup.hpp`. With this change all tests are able to complete when an NVIDIA GPU is in exclusive compute mode. Side effect of the change: Time for all tests to complete reduced from 15.71 to 13.03 sec Tesla C2075.
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
#include <boost/compute/algorithm/transform.hpp>
|
||||
#include <boost/compute/container/vector.hpp>
|
||||
|
||||
#include "context_setup.hpp"
|
||||
|
||||
namespace bc = boost::compute;
|
||||
|
||||
BOOST_AUTO_TEST_CASE(squared_plus_one)
|
||||
@@ -152,3 +154,5 @@ BOOST_AUTO_TEST_CASE(make_function_from_lamdba)
|
||||
BOOST_CHECK_EQUAL(int(vector[3]), int(19));
|
||||
BOOST_CHECK_EQUAL(int(vector[4]), int(23));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
Reference in New Issue
Block a user