Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
franz committed Oct 9, 2023
1 parent d705c5c commit 54b32f3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ struct CopySVMBufferKHR : public BasicSVMCommandBufferTest
cl_int Run() override
{
cl_int error = clCommandSVMMemFillKHR(
command_buffer, nullptr, svm_in_mem(), &pattern_1,
sizeof(cl_char), data_size(), 0, nullptr, nullptr, nullptr);
command_buffer, nullptr, svm_in_mem(), &pattern_1, sizeof(cl_char),
data_size(), 0, nullptr, nullptr, nullptr);
test_error(error, "clCommandSVMMemFillKHR failed");

error = clCommandSVMMemcpyKHR(command_buffer, nullptr, svm_out_mem(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ struct FillSVMBufferKHR : public BasicSVMCommandBufferTest
cl_int Run() override
{
cl_int error = clCommandSVMMemFillKHR(
command_buffer, nullptr, svm_in_mem(), &pattern_1,
sizeof(cl_char), data_size(), 0, nullptr, nullptr, nullptr);
command_buffer, nullptr, svm_in_mem(), &pattern_1, sizeof(cl_char),
data_size(), 0, nullptr, nullptr, nullptr);
test_error(error, "clCommandSVMMemFillKHR failed");

error = clFinalizeCommandBufferKHR(command_buffer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ bool BasicSVMCommandBufferTest::Skip()
log_error("Unable to initialise extension functions");
return true;
}
if (clCommandSVMMemcpyKHR == nullptr || clCommandSVMMemFillKHR == nullptr)
{
log_info("Platform does not support clCommandSVMMemcpyKHR or "
"clCommandSVMMemFillKHR\n");
return true;
}

return false;
}
Expand Down Expand Up @@ -85,11 +79,12 @@ cl_int BasicSVMCommandBufferTest::SetUpKernelArgs(void)

cl_int BasicSVMCommandBufferTest::init_extension_functions()
{
BasicCommandBufferTest::init_extension_functions();
cl_int error = BasicCommandBufferTest::init_extension_functions();
test_error(error, "Unable to initialise extension functions");

cl_platform_id platform;
cl_int error = clGetDeviceInfo(device, CL_DEVICE_PLATFORM,
sizeof(cl_platform_id), &platform, nullptr);
error = clGetDeviceInfo(device, CL_DEVICE_PLATFORM, sizeof(cl_platform_id),
&platform, nullptr);
test_error(error, "clGetDeviceInfo for CL_DEVICE_PLATFORM failed");

GET_EXTENSION_ADDRESS(clCommandSVMMemFillKHR);
Expand Down

0 comments on commit 54b32f3

Please sign in to comment.