Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backwards compatibility #446

Open
wants to merge 39 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
d8a73fd
* Change the OpenCL version verification system
dvdjg Mar 29, 2015
3df09fe
* Additional runtime version checks. Link time checks are not enough:…
dvdjg Mar 29, 2015
384adc2
* static cast to avoid a compiler warning.
dvdjg Mar 29, 2015
6bb7696
* Removed redundant const.
dvdjg Mar 29, 2015
a815f27
* Additional runtime version checks. Link time checks are not enough:…
dvdjg Mar 29, 2015
d46588b
* Added the version_number() function.
dvdjg Mar 29, 2015
ed7f213
* Use the context version_number() function.
dvdjg Mar 29, 2015
9078790
* Use the context version_number() function.
dvdjg Mar 29, 2015
4eb3a3b
* Changed the function name version_number() to get_version() to matc…
dvdjg Mar 29, 2015
8f20857
* Allow the automatic computation of the local work size by passing 0…
dvdjg Mar 30, 2015
b570d99
* m_version initialization was incomplete.
dvdjg Mar 30, 2015
cfa1e88
* Restored check_version() and check_device_version() for backward co…
dvdjg Mar 30, 2015
e0387db
* Compatibility with current code.
dvdjg Mar 30, 2015
6efcf0a
* enqueue_map_image() bug
dvdjg Mar 30, 2015
104e5f8
* Use of the enqueue_nd_range_kernel_async() function
dvdjg Mar 31, 2015
bffd846
* nbody.cpp - Use of:
dvdjg Mar 31, 2015
d0c4e17
* Added a default argument
dvdjg Mar 31, 2015
731c264
* Do not assume a device holds only a cl_device_id
dvdjg Mar 31, 2015
9043e98
* find_device() overload to allow partial search and min version check
dvdjg Mar 31, 2015
98210a5
* Changed the way the version is parsed. Now parses 3.01 as 301 and 1…
dvdjg Apr 1, 2015
93a5be6
* Resolve ambiguity find_device_name()
dvdjg Apr 1, 2015
ee08966
* Do not use the internal cl_event type in the functions interface
dvdjg Apr 5, 2015
d394700
* Avoid the use of min max macros in Windows
dvdjg Apr 5, 2015
3ea3157
* Use the execution_status enum
dvdjg Apr 11, 2015
6453d85
* Use const specifier
dvdjg Apr 11, 2015
07b5659
* Rename the variable future so it is not equal to the template future
dvdjg Apr 11, 2015
8cf1a0f
* Addede two utility functions:
dvdjg Apr 11, 2015
2a09905
get_type for not colliding with 'type' enum symbol
dvdjg Apr 14, 2015
8103bd3
find_device() improvements
dvdjg Apr 14, 2015
432665c
swap() facility
dvdjg Apr 14, 2015
64992da
enqueue_fill_image() fallback for pre 1.2 devices
dvdjg Apr 14, 2015
b3ce7b7
* Optional use of CL_DEVICE_TYPE_CUSTOM
dvdjg Apr 15, 2015
0d2fb59
* deleted compute::
dvdjg Apr 15, 2015
0f0b8c1
* Pre c++11 adaptation.
dvdjg Apr 15, 2015
30c69ed
* Introduced a raw version of fill image
dvdjg Apr 20, 2015
893248d
* enqueue_walk_image Default args
dvdjg Apr 20, 2015
35709b3
Adapt 1 for old compilers
dvdjg Apr 21, 2015
ef865b0
Adapt 2 for old compilers
dvdjg Apr 21, 2015
a8947bd
* Added BOOST_COMPUTE_USE_CPP11
dvdjg Apr 21, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
* enqueue_walk_image Default args
dvdjg committed Apr 20, 2015
commit 893248d231840c599167efbb9481de0c7b84358a
22 changes: 15 additions & 7 deletions include/boost/compute/command_queue.hpp
Original file line number Diff line number Diff line change
@@ -1017,9 +1017,9 @@ class command_queue
template<class Function>
void enqueue_walk_image(const image_object& image,
Function walk_elemets,
cl_map_flags flags,
const size_t *origin,
const size_t *region,
cl_map_flags flags = compute::command_queue::map_read,
const size_t *origin = NULL,
const size_t *region = NULL,
const wait_list &events = wait_list(),
event * pevent = NULL)
{
@@ -1031,8 +1031,16 @@ class command_queue
event map_event, *pmap_event = NULL;
user_event user_ev;
wait_list unmap_wait;
extents<3> origin3 = { origin[0], origin[1], origin[2] };
extents<3> region3 = { region[0], region[1], region[2] };
extents<3> origin3 = { 0, 0, 0 };
extents<3> region3 = { image.width(), std::max((size_t)1, image.height()), std::max((size_t)1, image.depth()) };

if (origin) {
origin3[0] = origin[0]; origin3[1] = origin[1]; origin3[2] = origin[2];
}

if (region) {
region3[0] = region[0]; region3[1] = region[1]; region3[2] = region[2];
}

if (pevent) {
// Async exec
@@ -1045,8 +1053,8 @@ class command_queue
enqueue_map_image(
image,
flags,
origin,
region,
origin3.data(),
region3.data(),
&row_pitch,
&slice_pitch,
events,
3 changes: 3 additions & 0 deletions include/boost/compute/image/image1d.hpp
Original file line number Diff line number Diff line change
@@ -81,6 +81,7 @@ class image1d : public image_object
}
else
#endif
(void) context; (void) image_width; (void) format; (void) flags; (void) host_ptr;
// image1d objects are only supported in OpenCL 1.2 and later
BOOST_THROW_EXCEPTION(opencl_error(CL_IMAGE_FORMAT_NOT_SUPPORTED));
}
@@ -157,6 +158,7 @@ class image1d : public image_object
#ifdef CL_VERSION_1_2
return image_object::get_supported_formats(context, CL_MEM_OBJECT_IMAGE1D, flags);
#else
(void) context; (void) flags;
return std::vector<image_format>();
#endif
}
@@ -172,6 +174,7 @@ class image1d : public image_object
format, context, CL_MEM_OBJECT_IMAGE1D, flags
);
#else
(void) format; (void) context; (void) flags;
return false;
#endif
}