Skip to content

Commit

Permalink
Few minor corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
shajder committed Mar 15, 2024
1 parent 2f7de4d commit 42639ed
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ namespace {
////////////////////////////////////////////////////////////////////////////////
// command buffer with multiple command handles dispatch tests

struct MultipleCommandsDispatch : InfoMutableCommandBufferTest
struct MultipleCommandsDispatch : BasicMutableCommandBufferTest
{
MultipleCommandsDispatch(cl_device_id device, cl_context context,
cl_command_queue queue)
: InfoMutableCommandBufferTest(device, context, queue),
: BasicMutableCommandBufferTest(device, context, queue),
command_pri(nullptr), command_sec(nullptr)
{
simultaneous_use_requested = false;
Expand Down Expand Up @@ -124,18 +124,16 @@ struct MultipleCommandsDispatch : InfoMutableCommandBufferTest
// run command buffer with multiple command dispatches test
cl_int Run() override
{
size_t work_offset = 0;

// record fill kernel and collect first mutable command handle
cl_int error = clCommandNDRangeKernelKHR(
command_buffer, nullptr, nullptr, kernel_fill, 1, &work_offset,
command_buffer, nullptr, nullptr, kernel_fill, 1, nullptr,
&num_elements, nullptr, 0, nullptr, nullptr, &command_pri);
test_error(error, "clCommandNDRangeKernelKHR failed");

// record default kernel and collect second mutable command handle
error = clCommandNDRangeKernelKHR(
command_buffer, nullptr, nullptr, kernel, 1, &work_offset,
&num_elements, nullptr, 0, nullptr, nullptr, &command_sec);
command_buffer, nullptr, nullptr, kernel, 1, nullptr, &num_elements,
nullptr, 0, nullptr, nullptr, &command_sec);
test_error(error, "clCommandNDRangeKernelKHR failed");

error = clFinalizeCommandBufferKHR(command_buffer);
Expand Down

0 comments on commit 42639ed

Please sign in to comment.