Skip to content

Commit

Permalink
added several cosmetic corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
shajder committed Oct 11, 2024
1 parent 77c375f commit 678cca6
Showing 1 changed file with 17 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@
} \
} while (false)

static const char* source = "__kernel void empty() {}";
namespace {

static void log_info_semaphore_type(
const char *source = "__kernel void empty() {}";

void log_info_semaphore_type(
VulkanExternalSemaphoreHandleType vkExternalSemaphoreHandleType)
{
std::stringstream semaphore_type_description;
Expand All @@ -66,7 +68,7 @@ static void log_info_semaphore_type(
log_info("%s", semaphore_type_description.str().c_str());
}

static int init_vuikan_device(cl_uint num_devices, cl_device_id* deviceIds)
int init_vulkan_device(cl_uint num_devices, cl_device_id *deviceIds)
{
cl_platform_id platform = nullptr;

Expand All @@ -84,9 +86,9 @@ static int init_vuikan_device(cl_uint num_devices, cl_device_id* deviceIds)
return CL_SUCCESS;
}

static cl_int get_device_semaphore_handle_types(
cl_int get_device_semaphore_handle_types(
cl_device_id deviceID, cl_device_info param,
std::vector<cl_external_semaphore_handle_type_khr>& handle_types)
std::vector<cl_external_semaphore_handle_type_khr> &handle_types)
{
int err = CL_SUCCESS;
// Query for export support
Expand Down Expand Up @@ -120,6 +122,8 @@ static cl_int get_device_semaphore_handle_types(
return CL_SUCCESS;
}

} // anonymous namespace

// Confirm the semaphores can be successfully queried
int test_external_semaphores_queries(cl_device_id deviceID, cl_context context,
cl_command_queue defaultQueue,
Expand All @@ -139,7 +143,7 @@ int test_external_semaphores_queries(cl_device_id deviceID, cl_context context,
return TEST_SKIPPED_ITSELF;
}

if (init_vuikan_device(1, &deviceID))
if (init_vulkan_device(1, &deviceID))
{
log_info("Cannot initialise Vulkan. "
"Skipping test.\n");
Expand Down Expand Up @@ -350,7 +354,7 @@ int test_external_semaphores_simple_1(cl_device_id deviceID, cl_context context,
return TEST_SKIPPED_ITSELF;
}

if (init_vuikan_device(1, &deviceID))
if (init_vulkan_device(1, &deviceID))
{
log_info("Cannot initialise Vulkan. "
"Skipping test.\n");
Expand Down Expand Up @@ -430,7 +434,7 @@ int test_external_semaphores_simple_2(cl_device_id deviceID, cl_context context,
return TEST_SKIPPED_ITSELF;
}

if (init_vuikan_device(1, &deviceID))
if (init_vulkan_device(1, &deviceID))
{
log_info("Cannot initialise Vulkan. "
"Skipping test.\n");
Expand Down Expand Up @@ -539,7 +543,7 @@ int test_external_semaphores_reuse(cl_device_id deviceID, cl_context context,
return TEST_SKIPPED_ITSELF;
}

if (init_vuikan_device(1, &deviceID))
if (init_vulkan_device(1, &deviceID))
{
log_info("Cannot initialise Vulkan. "
"Skipping test.\n");
Expand Down Expand Up @@ -664,7 +668,7 @@ static int external_semaphore_cross_queue_helper(cl_device_id deviceID,
return TEST_SKIPPED_ITSELF;
}

if (init_vuikan_device(1, &deviceID))
if (init_vulkan_device(1, &deviceID))
{
log_info("Cannot initialise Vulkan. "
"Skipping test.\n");
Expand Down Expand Up @@ -784,7 +788,7 @@ int test_external_semaphores_cross_queues_io2(cl_device_id deviceID,
return TEST_SKIPPED_ITSELF;
}

if (init_vuikan_device(1, &deviceID))
if (init_vulkan_device(1, &deviceID))
{
log_info("Cannot initialise Vulkan. "
"Skipping test.\n");
Expand Down Expand Up @@ -898,7 +902,7 @@ int test_external_semaphores_multi_signal(cl_device_id deviceID,
return TEST_SKIPPED_ITSELF;
}

if (init_vuikan_device(1, &deviceID))
if (init_vulkan_device(1, &deviceID))
{
log_info("Cannot initialise Vulkan. "
"Skipping test.\n");
Expand Down Expand Up @@ -994,7 +998,7 @@ int test_external_semaphores_multi_wait(cl_device_id deviceID,
return TEST_SKIPPED_ITSELF;
}

if (init_vuikan_device(1, &deviceID))
if (init_vulkan_device(1, &deviceID))
{
log_info("Cannot initialise Vulkan. "
"Skipping test.\n");
Expand Down

0 comments on commit 678cca6

Please sign in to comment.