Skip to content

Commit

Permalink
Removed unnecessary user event
Browse files Browse the repository at this point in the history
  • Loading branch information
shajder committed Jun 22, 2023
1 parent 0b666f8 commit e085eb4
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions test_conformance/select/test_select.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,23 +389,23 @@ static int doTest(cl_command_queue queue, cl_context context, Type stype, Type c

log_info("Testing...");
uint64_t i;

for (i=0; i < blocks; i+=step)
{
initSrcBuffer(src1_host.data(), stype, d);
initSrcBuffer(src2_host.data(), stype, d);
initCmpBuffer(cmp_host.data(), cmptype, i * cmp_stride, block_elements);

clEventWrapper user_event = clCreateUserEvent(context, &err);
test_error_count(err, "clCreateUserEvent failed");

err = clEnqueueWriteBuffer(queue, src1, CL_FALSE, 0, BUFFER_SIZE,
src1_host.data(), 1, &user_event, NULL);
src1_host.data(), 0, NULL, NULL);
test_error_count(err, "Error: Could not write src1");

err = clEnqueueWriteBuffer(queue, src2, CL_FALSE, 0, BUFFER_SIZE,
src2_host.data(), 1, &user_event, NULL);
src2_host.data(), 0, NULL, NULL);
test_error_count(err, "Error: Could not write src2");

err = clEnqueueWriteBuffer(queue, cmp, CL_FALSE, 0, BUFFER_SIZE,
cmp_host.data(), 1, &user_event, NULL);
cmp_host.data(), 0, NULL, NULL);
test_error_count(err, "Error: Could not write cmp");

Select sfunc = (cmptype == ctype[stype][0]) ? vrefSelects[stype][0]
Expand All @@ -418,9 +418,6 @@ static int doTest(cl_command_queue queue, cl_context context, Type stype, Type c
(*sfunc)(sref.data(), src1_host.data(), src2_host.data(),
cmp_host.data(), block_elements);

err = clSetUserEventStatus(user_event, CL_COMPLETE);
test_error_count(err, "clSetUserEventStatus failed");

for (int vecsize = 0; vecsize < VECTOR_SIZE_COUNT; ++vecsize)
{
size_t vector_size = element_count[vecsize] * type_size[stype];
Expand Down

0 comments on commit e085eb4

Please sign in to comment.