2
0
mirror of https://github.com/boostorg/compute.git synced 2026-02-02 20:52:17 +00:00

Fix bug in command_queue test on AMD platforms

This fixes a bug in the event_profiling test case in the
command_queue test. On AMD platforms, the event object
returned from clEnqueueMarker() has no profiling information
associated with it and returns an error code when accessed.

Now, profiling information for a simple write to a device
buffer is checked instead.
This commit is contained in:
Kyle Lutz
2013-03-26 23:33:57 -04:00
parent 4338b311f7
commit 14ea0bdbff

View File

@@ -30,7 +30,14 @@ BOOST_AUTO_TEST_CASE(event_profiling)
bc::context context(device);
bc::command_queue queue(context, device, bc::command_queue::enable_profiling);
bc::event event = queue.enqueue_marker();
int data[] = { 1, 2, 3, 4, 5, 6, 7, 8 };
bc::buffer buffer(context, sizeof(data));
bc::event event =
queue.enqueue_write_buffer_async(buffer,
0,
sizeof(data),
static_cast<const void *>(data));
queue.finish();
event.get_profiling_info<cl_ulong>(bc::event::profiling_command_queued);