1 //---------------------------------------------------------------------------// 2 // Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.com> 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 11 //[hello_world_example 12 13 #include <iostream> 14 15 #include <boost/compute/core.hpp> 16 17 namespace compute = boost::compute; 18 main()19int main() 20 { 21 // get the default device 22 compute::device device = compute::system::default_device(); 23 24 // print the device's name and platform 25 std::cout << "hello from " << device.name(); 26 std::cout << " (platform: " << device.platform().name() << ")" << std::endl; 27 28 return 0; 29 } 30 //] 31