Commit Graph

7 Commits

Author SHA1 Message Date
Jakub Szuppe
f14950fab3 Print platform name in hello_world.cpp example
It is useful for identifying which platform is the default
one, when the same device is on multiple platforms.
2017-05-08 18:49:18 +02:00
Kyle Lutz
fda67a22d0 Update GitHub links 2015-05-17 20:32:09 -07:00
Kyle Lutz
fc9f014526 Add core.hpp header 2014-06-07 11:57:11 -07:00
Kyle Lutz
38c6e9bc0f Include only necessary headers in examples 2014-01-06 19:07:30 -08:00
Kyle Lutz
c70056491d Cleanup example code
This cleans up the example code. Now all of the examples use
the "namespace compute = boost::compute" alias. This shortens
the example code making it less verbose and more clear. Also
cleans up a few style issues.
2013-05-20 20:50:12 -04:00
Denis Demidov
8b78d4187d Adds support for selecting devices with environment variables
boost::compute::system::default_device() supports the following
environment variables:

BOOST_COMPUTE_DEFAULT_DEVICE   for device name
BOOST_COMPUTE_DEFAULT_PLATFORM for OpenCL platform name
BOOST_COMPUTE_DEFAULT_VENDOR   for device vendor name

If one or more of these variables is set, then device that satisfies
all conditions gets selected. If such a device is unavailable, then
the first available GPU is selected. If there are no GPUs in the
system, then the first available CPU is selected. Otherwise,
default_device() returns null device.

The hello_world example is modified to use default_device() instead
of default_gpu_device().
2013-04-12 17:22:25 -04:00
Kyle Lutz
d34cdaac59 Initial commit 2013-03-02 15:14:17 -05:00