context_setup.hpp 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. //---------------------------------------------------------------------------//
  2. // Copyright (c) 2013-2014 Denis Demidov
  3. //
  4. // Distributed under the Boost Software License, Version 1.0
  5. // See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt
  7. //
  8. // See http://boostorg.github.com/compute for more information.
  9. //---------------------------------------------------------------------------//
  10. #ifndef BOOST_COMPUTE_TEST_CONTEXT_SETUP_HPP
  11. #define BOOST_COMPUTE_TEST_CONTEXT_SETUP_HPP
  12. #include <boost/compute/system.hpp>
  13. #include <boost/compute/command_queue.hpp>
  14. #include "opencl_version_check.hpp"
  15. struct Context {
  16. boost::compute::device device;
  17. boost::compute::context context;
  18. boost::compute::command_queue queue;
  19. Context() :
  20. device ( boost::compute::system::default_device() ),
  21. context( boost::compute::system::default_context() ),
  22. queue ( boost::compute::system::default_queue() )
  23. {}
  24. };
  25. BOOST_FIXTURE_TEST_SUITE(compute_test, Context)
  26. #endif