Commit Graph

120 Commits

Author SHA1 Message Date
Kyle Lutz
9f13c7e3b8 Merge pull request #236 from f-koehler/nbody
Nbody
2014-08-14 18:45:08 -07:00
f-koehler
8e37337eeb documented code widget is now closed using the escape key 2014-08-13 14:33:27 +02:00
f-koehler
18e0883016 first working nbody simulation 2014-08-13 14:33:27 +02:00
Kyle Lutz
bc360c4dd2 Merge pull request #232 from f-koehler/mandelbrot-esc
MandelbrotWidget can be closed pressing escape now
2014-08-12 07:38:28 -07:00
f-koehler
1c561814da MandelbrotWidget can be closed pressing escape now 2014-08-12 10:38:43 +02:00
f-koehler
15f9793bd8 choose qt4 or qt5 2014-08-05 16:36:46 +02:00
fkoehler
b70df00ce4 explicitly look for Qt4 and not for Qt in general 2014-07-29 13:23:43 +02:00
Kyle Lutz
9dc87712e9 Improve documentation 2014-07-11 23:25:41 -07:00
Kyle Lutz
9f74b5290e Enable OpenCV on Travis-CI 2014-06-24 20:54:02 -07:00
Kyle Lutz
b011138c1f Merge pull request #151 from Mageswaran1989/adding-opencv_sobel_filter-example
added opencv sobel filter

Conflicts:
	example/CMakeLists.txt
2014-06-20 18:51:32 -07:00
Kyle Lutz
0fa15ea706 Merge pull request #150 from Mageswaran1989/adding-opencv_convolution.cpp-example
added example/opencv_convolution.cpp
added return in catch block

Conflicts:
	example/CMakeLists.txt
2014-06-20 18:46:04 -07:00
Mageswaran
01bf3abe30 added return in catch block 2014-06-20 21:24:56 +05:30
Kyle Lutz
dceaa72c11 Merge pull request #148 from Mageswaran1989/renaming-opencv_filter-to-opencv_flip
renamed example/opencv_filter.cpp to example/opencv_flip.cpp
2014-06-20 08:34:29 -07:00
Mageswaran
aae0f777a3 added opencv sobel filter 2014-06-20 18:35:20 +05:30
Mageswaran
3210ee0c1f added example/opencv_convolution.cpp 2014-06-20 17:26:02 +05:30
Mageswaran
2f6dda41d9 renamed example/opencv_filter.cpp to example/opencv_flip.cpp 2014-06-20 11:27:05 +05:30
Kyle Lutz
c82bcfddd6 Merge pull request #138 from Mageswaran1989/merging-optical-flow-examples
merged opencv optical examples with command line options
2014-06-16 18:37:18 -07:00
Mageswaran
f6c46f665f merged opencv optical examples with command line options 2014-06-16 11:26:12 +05:30
Kyle Lutz
c1d867ba48 Use program_options for matrix_transpose example 2014-06-12 20:26:34 -07:00
Kyle Lutz
01eed2c702 Cleanup matrix_transpose example 2014-06-12 19:46:46 -07:00
vaa-msu
2feec50926 Update matrix_transpose.cpp
Changed 'uint's to 'uint_'s and defined uint64_t for Win32
2014-06-12 18:56:38 -07:00
Kyle Lutz
5f406314ae Use program_options for resize_image example 2014-06-10 19:22:40 -07:00
Kyle Lutz
fc9f014526 Add core.hpp header 2014-06-07 11:57:11 -07:00
vaa-msu
fb6c3528d3 Changed tpb and workSize to 'uint_'s 2014-06-03 09:51:38 +04:00
Kyle Lutz
8cfaf793f6 Add memory_limits example 2014-05-24 23:25:57 -07:00
Kyle Lutz
f119d6f9d6 Merge pull request #118 from Mageswaran1989/master
added opencv optical flow example
2014-05-23 22:55:30 -07:00
Mageswaran
b7f2f43e0f added opencv optical flow example 2014-05-23 12:02:02 +05:30
Kyle Lutz
dcefed4ed4 Add resize_image example 2014-05-17 17:52:23 -07:00
Benoit Dequidt
8587c1b9d9 creation of matrix_transpose example 2014-05-14 00:34:00 +08:00
Benoit Dequidt
4fdef7756e Creation of simple_moving_average example 2014-05-14 00:34:00 +08:00
Kyle Lutz
00f782355e Add example and test for AMD's static C++ kernel language 2014-04-28 21:53:36 -07:00
Kyle Lutz
bfe212059f Add k_means example 2014-04-27 13:41:18 -07:00
Kyle Lutz
e8d91023b5 Add random_walk example 2014-04-27 13:27:03 -07:00
Kyle Lutz
1bd141a544 Add fizz_buzz example 2014-04-22 21:48:05 -07:00
Kyle Lutz
4b67907023 Change BOOST_COMPUTE_FUNCTION() to use custom argument names
This changes the BOOST_COMPUTE_FUNCTION() macro (and the related
BOOST_COMPUTE_CLOSURE() macro) to use custom, user-provided argument
names instead of auto-generating them based on their index.

This is an API-breaking change. Users should now provide argument
names when using the BOOST_COMPUTE_FUNCTION() macro. The examples
and documentation have been updated to reflect the new API.
2014-04-20 19:13:48 -07:00
Kyle Lutz
8b06e3f7bb Add event::duration() method 2014-04-19 12:31:37 -07:00
Kyle Lutz
6336b81911 Rename mersenne_twister_engine::fill() to generate() 2014-04-13 14:13:53 -07:00
Kyle Lutz
b7c4f0ce18 Change mersenne_twister::seed() to take a command_queue 2014-04-12 11:14:44 -07:00
Kyle Lutz
7966768c80 Remove read/write buffer convenience overloads in command_queue 2014-04-12 09:40:37 -07:00
Kyle Lutz
7ec4566a00 Remove default local_work_size argument for enqueue_nd_range_kernel() 2014-04-12 09:22:28 -07:00
Kyle Lutz
89d97768d2 Remove enqueue_1d_range_kernel() overload with no local work-size 2014-04-12 09:17:48 -07:00
Kyle Lutz
637cc98c01 Add print_vector example 2014-04-11 21:36:57 -07:00
Kyle Lutz
b3f8847422 Add mandelbrot example 2014-03-28 18:16:17 -07:00
Kyle Lutz
cf8e972e55 Improve kernel::set_arg() method 2014-03-12 21:02:22 -07:00
Kyle Lutz
9e5bff9d83 Add SYSTEM to third-party include_directories() calls 2014-03-12 20:41:04 -07:00
Kyle Lutz
71af014b3d Add mapped_view container 2014-03-08 13:17:55 -08:00
Kyle Lutz
f3c2384af4 Add opengl_create_shared_context() function 2014-02-01 12:27:23 -08:00
Kyle Lutz
32379dd836 Fix bug with opengl_sphere example on AMD 2014-02-01 12:10:58 -08:00
Kyle Lutz
881d398fff Use glDrawArrays() in opengl_sphere example 2014-02-01 12:10:12 -08:00
Kyle Lutz
ccd6f21d98 Change vector constructors to take queue argument
This changes the vector<T> constructors which copy or initialize
data to take a queue argument used for performing the operations.

Previously they just took a context argument used to initialize the
buffer and then created a new command queue to use. This improves
performance by not requiring a new command queue and also fixes issues
when performing operations on a different command queue while the
vector was still being initialized.
2014-01-27 23:39:19 -08:00
Kyle Lutz
f235e59e82 Add inline_ptx example 2014-01-20 20:05:34 -08:00
Kyle Lutz
3be0ae78d8 Add batched_determinant example 2014-01-20 19:43:09 -08:00
Kyle Lutz
936d801466 Add support for host iterators to sort() 2014-01-13 18:27:52 -08:00
Kyle Lutz
aad03486d9 Add interop support
This adds interoperability support between Boost.Compute and various
other C/C++ libraries (Eigen, OpenCV, OpenGL, Qt and VTK). This eases
development for users using external libraries with Boost.Compute.
2014-01-06 23:35:38 -08:00
Kyle Lutz
0bc8818c50 Add Black-Scholes option pricing example 2014-01-06 22:52:48 -08:00
Kyle Lutz
eca81df028 Merge pull request #39 from ddemidov/offline-cache
Implements offline kernel caching
2014-01-06 22:47:52 -08:00
Denis Demidov
562f149b18 Implements offline kernel caching
See kylelutz/compute#21

This adds program::build_with_source() function that both creates and
builds the program for the given context with supplied source and
compile options. In case BOOST_COMPUTE_USE_OFFLINE_CACHE macro is
defined, it also saves the compiled program binary for reuse in the
offline cache located in $HOME/.boost_compute folder on UNIX-like
systems and in %APPDATA%/boost_compute folder on Windows.

All internal uses of program::create_with_source() followed by
program::build() are replaced with program::build_with_source().
2014-01-07 09:07:00 +04:00
Kyle Lutz
38c6e9bc0f Include only necessary headers in examples 2014-01-06 19:07:30 -08:00
Kyle Lutz
9f5ccb5ac6 Add price_cross example
This adds a new example demonstating the use of find_if() and
zip_iterator to find the point at which two vectors of price values
cross each other.
2014-01-03 14:34:47 -08:00
Kyle Lutz
52b1502f37 Rename find_longest_vector example to longest_vector 2014-01-03 14:09:47 -08:00
Kyle Lutz
4e94cab681 Improve the monte carlo example
This improves the monte carlo example by using the count_if()
algorithm instead of a custom kernel with atomics. Also includes
only the required headers instead of all the Boost.Compute headers.
2014-01-03 12:59:18 -08:00
Kyle Lutz
518d39fc2b Use bitwise-and to check device::type()
This changes the checks for the device type to use the bitwise-and
operator instead of the equaility operator. The returned type is a
bitset and this would cause errors when multiple bits were set.

This fixes a bug on POCL which returns the device type as a
combination of CL_DEVICE_TYPE_DEFAULT and CL_DEVICE_TYPE_CPU. Now
the correct device type (device::cpu) is detected for POCL.
2013-09-07 14:16:20 -04:00
Kyle Lutz
3bc5bfaf78 Remove timer class
This removes the timer class. The technique of measuring the time
difference between two different OpenCL markers on a command queue
is not portable to all OpenCL implementations (only works on NVIDIA).

A new internal timer class has been added which uses boost::chrono
(or std::chrono if BOOST_COMPUTE_TIMER_USE_STD_CHRONO is defined).
This new timer is used by the benchmarks to measure time elapsed
on the host.
2013-05-20 21:08:42 -04: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
Kyle Lutz
4ab37ada07 Add system-wide default command queue
This adds a system-wide default command queue. This queue is
accessible via the new static system::default_queue() method.
The default command queue is created for the default compute
device in the default context and is analogous to the default
stream in CUDA.

This changes how algorithms operate when invoked without an
explicit command queue. Previously, each algorithm had two
overloads, the first expected a command queue to be explicitly
passed and the second would create and use a temporary command
queue. Now, all algorithms take a command queue argument which
has a default value equal to system::default_queue().

This fixes a number of race-conditions and performance issues
througout the library associated with create, using, and
destroying many separate command queues.
2013-05-15 20:59:56 -04:00
Kyle Lutz
0b466fec72 Fix indexing bug in list_devices example
This fixes an indexing bug in the list_devices example in
which the information would only be printed for the first
device on a platform.
2013-05-11 20:11:58 -04:00
Kyle Lutz
178676df4f Refactor the system::default_device() method
This refactors the system::default_device() method. Now, the
default compute device for the system is only found once and
stored in a static variable. This eliminates many redundant
calls to clGetPlatformIDs() and clGetDeviceIDs().

Also, the default_cpu_device() and default_gpu_device() methods
have been removed and their usages replaced with default_device().
2013-05-10 22:49:05 -04:00
Dominic Meiser
2a93124ef5 Using FindOpenCL module from VexCL
Changed CMakeLists.txt files in Boost.Compute to use the variables
defined by FindOpenCL.
2013-04-23 20:03:38 -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