Skip to content

Commit

Permalink
fix for previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
shajder committed Oct 28, 2024
1 parent c48d47e commit 7cba4cd
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,22 +206,21 @@ struct SemaphoreOutOfOrderOps : public SemaphoreTestBase
std::vector<cl_int> host_buffer(half_num_elems * 2, pattern_pri);

{
clEventWrapper wait_events[2];
clEventWrapper user_event = clCreateUserEvent(context, &err);
test_error(err, "clCreateUserEvent failed");

// enqueue producer operations
err = clEnqueueWriteBuffer(producer_queue_pri, in_mem, CL_FALSE, 0,
sizeof(cl_int) * half_num_elems,
host_buffer.data(), 1, &user_event,
&wait_events[0]);
nullptr);
test_error(err, "clEnqueueReadBuffer failed");

err = clEnqueueWriteBuffer(producer_queue_sec, in_mem, CL_FALSE,
sizeof(cl_int) * half_num_elems,
sizeof(cl_int) * half_num_elems,
host_buffer.data(), 1, &user_event,
&wait_events[1]);
nullptr);
test_error(err, "clEnqueueReadBuffer failed");

// launch producer operations simultaneously
Expand Down

0 comments on commit 7cba4cd

Please sign in to comment.