Fix code format errors
diff --git a/test_common/harness/kernelHelpers.cpp b/test_common/harness/kernelHelpers.cpp
index 41e3af5..91ed395 100644
--- a/test_common/harness/kernelHelpers.cpp
+++ b/test_common/harness/kernelHelpers.cpp
@@ -665,30 +665,40 @@
size_t length = modifiedKernelBuf.size();
log_info("offlineCompiler: clCreateProgramWithSource replaced with clCreateProgramWithIL\n");
- if (gCoreILProgram) {
- *outProgram = clCreateProgramWithIL(context, &modifiedKernelBuf[0], length, &error);
+ if (gCoreILProgram)
+ {
+ *outProgram = clCreateProgramWithIL(context, &modifiedKernelBuf[0],
+ length, &error);
}
- else {
+ else
+ {
cl_platform_id platform;
- error = clGetDeviceInfo(device, CL_DEVICE_PLATFORM, sizeof(cl_platform_id), &platform, NULL);
+ error = clGetDeviceInfo(device, CL_DEVICE_PLATFORM,
+ sizeof(cl_platform_id), &platform, NULL);
print_error(error, "clGetDeviceInfo for CL_DEVICE_PLATFORM failed");
clCreateProgramWithILKHR_fn clCreateProgramWithILKHR = NULL;
- clCreateProgramWithILKHR = (clCreateProgramWithILKHR_fn)clGetExtensionFunctionAddressForPlatform(platform, "clCreateProgramWithILKHR");
+ clCreateProgramWithILKHR = (clCreateProgramWithILKHR_fn)
+ clGetExtensionFunctionAddressForPlatform(
+ platform, "clCreateProgramWithILKHR");
if (clCreateProgramWithILKHR == NULL)
{
- log_error("ERROR: clGetExtensionFunctionAddressForPlatform failed\n");
+ log_error(
+ "ERROR: clGetExtensionFunctionAddressForPlatform failed\n");
return -1;
}
- *outProgram = clCreateProgramWithILKHR(context, &modifiedKernelBuf[0], length, &error);
+ *outProgram = clCreateProgramWithILKHR(
+ context, &modifiedKernelBuf[0], length, &error);
}
if (*outProgram == NULL || error != CL_SUCCESS)
{
- if (gCoreILProgram) {
+ if (gCoreILProgram)
+ {
print_error(error, "clCreateProgramWithIL failed");
}
- else {
+ else
+ {
print_error(error, "clCreateProgramWithILKHR failed");
}
return error;
diff --git a/test_common/harness/testHarness.cpp b/test_common/harness/testHarness.cpp
index bda6f35..fcabda5 100644
--- a/test_common/harness/testHarness.cpp
+++ b/test_common/harness/testHarness.cpp
@@ -57,7 +57,7 @@
int gIsOpenCL_C_1_0_Device = 0;
int gIsOpenCL_1_0_Device = 0;
int gHasLong = 1;
-bool gCoreILProgram = true;
+bool gCoreILProgram = true;
#define DEFAULT_NUM_ELEMENTS 0x4000
@@ -79,9 +79,13 @@
log_info("FAILED %d of %d tests.\n", count, count);
return EXIT_FAILURE;
}
-void version_expected_info(const char * test_name, const char * api_name, const char * expected_version, const char * device_version) {
- log_info("%s skipped (requires at least %s version %s, but the device reports %s version %s)\n",
- test_name, api_name, expected_version, api_name, device_version);
+void version_expected_info(const char *test_name, const char *api_name,
+ const char *expected_version,
+ const char *device_version)
+{
+ log_info("%s skipped (requires at least %s version %s, but the device "
+ "reports %s version %s)\n",
+ test_name, api_name, expected_version, api_name, device_version);
}
int runTestHarnessWithCheck( int argc, const char *argv[], int testNum, test_definition testList[],
int forceNoContextCreation, cl_command_queue_properties queueProps,
@@ -433,17 +437,16 @@
log_error("Invalid device address bit size returned by device.\n");
return EXIT_FAILURE;
}
- if (gCompilationMode == kSpir_v) {
+ if (gCompilationMode == kSpir_v)
+ {
test_status spirv_readiness = check_spirv_compilation_readiness(device);
- if (spirv_readiness != TEST_PASS) {
+ if (spirv_readiness != TEST_PASS)
+ {
switch (spirv_readiness)
{
- case TEST_PASS:
- break;
- case TEST_FAIL:
- return fail_init_info(testNum);
- case TEST_SKIP:
- return skip_init_info(testNum);
+ case TEST_PASS: break;
+ case TEST_FAIL: return fail_init_info(testNum);
+ case TEST_SKIP: return skip_init_info(testNum);
}
}
}
@@ -699,7 +702,9 @@
const Version device_version = get_device_cl_version(deviceToUse);
if (test.min_version > device_version)
{
- version_expected_info(test.name, "OpenCL", test.min_version.to_string().c_str(), device_version.to_string().c_str());
+ version_expected_info(test.name, "OpenCL",
+ test.min_version.to_string().c_str(),
+ device_version.to_string().c_str());
return TEST_SKIP;
}
@@ -905,48 +910,66 @@
throw std::runtime_error(std::string("Unknown OpenCL version: ") + str.data());
}
-bool check_device_spirv_version_reported(cl_device_id device) {
+bool check_device_spirv_version_reported(cl_device_id device)
+{
size_t str_size;
cl_int err;
std::vector<char> str;
- if (gCoreILProgram) {
+ if (gCoreILProgram)
+ {
err = clGetDeviceInfo(device, CL_DEVICE_IL_VERSION, 0, NULL, &str_size);
- if (err != CL_SUCCESS) {
- log_error("clGetDeviceInfo: cannot read CL_DEVICE_IL_VERSION size;");
+ if (err != CL_SUCCESS)
+ {
+ log_error(
+ "clGetDeviceInfo: cannot read CL_DEVICE_IL_VERSION size;");
return false;
}
str.resize(str_size);
- err = clGetDeviceInfo(device, CL_DEVICE_IL_VERSION, str_size, str.data(), NULL);
- if (err != CL_SUCCESS) {
- log_error("clGetDeviceInfo: cannot read CL_DEVICE_IL_VERSION value;");
+ err = clGetDeviceInfo(device, CL_DEVICE_IL_VERSION, str_size,
+ str.data(), NULL);
+ if (err != CL_SUCCESS)
+ {
+ log_error(
+ "clGetDeviceInfo: cannot read CL_DEVICE_IL_VERSION value;");
return false;
}
}
- else {
- cl_int err = clGetDeviceInfo(device, CL_DEVICE_IL_VERSION_KHR, 0, NULL, &str_size);
- if (err != CL_SUCCESS) {
- log_error("clGetDeviceInfo: cannot read CL_DEVICE_IL_VERSION_KHR size;");
+ else
+ {
+ cl_int err = clGetDeviceInfo(device, CL_DEVICE_IL_VERSION_KHR, 0, NULL,
+ &str_size);
+ if (err != CL_SUCCESS)
+ {
+ log_error(
+ "clGetDeviceInfo: cannot read CL_DEVICE_IL_VERSION_KHR size;");
return false;
}
str.resize(str_size);
- err = clGetDeviceInfo(device, CL_DEVICE_IL_VERSION_KHR, str_size, str.data(), NULL);
- if (err != CL_SUCCESS) {
- log_error("clGetDeviceInfo: cannot read CL_DEVICE_IL_VERSION_KHR value;");
+ err = clGetDeviceInfo(device, CL_DEVICE_IL_VERSION_KHR, str_size,
+ str.data(), NULL);
+ if (err != CL_SUCCESS)
+ {
+ log_error(
+ "clGetDeviceInfo: cannot read CL_DEVICE_IL_VERSION_KHR value;");
return false;
}
}
- if (strstr(str.data(), "SPIR-V") == NULL) {
+ if (strstr(str.data(), "SPIR-V") == NULL)
+ {
log_info("This device does not support SPIR-V offline compilation.\n");
return false;
- } else {
+ }
+ else
+ {
Version spirv_version = get_device_spirv_il_version(device);
- log_info("This device supports SPIR-V offline compilation. SPIR-V version is %s\n", spirv_version.to_string().c_str());
+ log_info("This device supports SPIR-V offline compilation. SPIR-V "
+ "version is %s\n",
+ spirv_version.to_string().c_str());
}
return true;
-
}
Version get_device_spirv_il_version(cl_device_id device)
@@ -954,20 +977,25 @@
size_t str_size;
cl_int err;
std::vector<char> str;
- if (gCoreILProgram) {
+ if (gCoreILProgram)
+ {
err = clGetDeviceInfo(device, CL_DEVICE_IL_VERSION, 0, NULL, &str_size);
ASSERT_SUCCESS(err, "clGetDeviceInfo");
str.resize(str_size);
- err = clGetDeviceInfo(device, CL_DEVICE_IL_VERSION, str_size, str.data(), NULL);
+ err = clGetDeviceInfo(device, CL_DEVICE_IL_VERSION, str_size,
+ str.data(), NULL);
ASSERT_SUCCESS(err, "clGetDeviceInfo");
}
- else {
- err = clGetDeviceInfo(device, CL_DEVICE_IL_VERSION_KHR, 0, NULL, &str_size);
+ else
+ {
+ err = clGetDeviceInfo(device, CL_DEVICE_IL_VERSION_KHR, 0, NULL,
+ &str_size);
ASSERT_SUCCESS(err, "clGetDeviceInfo");
str.resize(str_size);
- err = clGetDeviceInfo(device, CL_DEVICE_IL_VERSION_KHR, str_size, str.data(), NULL);
+ err = clGetDeviceInfo(device, CL_DEVICE_IL_VERSION_KHR, str_size,
+ str.data(), NULL);
ASSERT_SUCCESS(err, "clGetDeviceInfo");
}
@@ -984,7 +1012,8 @@
else if (strstr(str.data(), "SPIR-V_1.5") != NULL)
return Version(1, 5);
- throw std::runtime_error(std::string("Unknown SPIR-V version: ") + str.data());
+ throw std::runtime_error(std::string("Unknown SPIR-V version: ")
+ + str.data());
}
test_status check_spirv_compilation_readiness(cl_device_id device)
@@ -992,35 +1021,52 @@
auto ocl_version = get_device_cl_version(device);
auto ocl_expected_min_version = Version(2, 1);
- if (ocl_version < ocl_expected_min_version) {
- if (is_extension_available(device, "cl_khr_il_program")) {
+ if (ocl_version < ocl_expected_min_version)
+ {
+ if (is_extension_available(device, "cl_khr_il_program"))
+ {
gCoreILProgram = false;
bool spirv_supported = check_device_spirv_version_reported(device);
- if (spirv_supported == false) {
- log_error("SPIR-V intermediate language not supported !!! OpenCL %s requires support.\n", ocl_version.to_string().c_str());
+ if (spirv_supported == false)
+ {
+ log_error("SPIR-V intermediate language not supported !!! "
+ "OpenCL %s requires support.\n",
+ ocl_version.to_string().c_str());
return TEST_FAIL;
}
- else {
+ else
+ {
return TEST_PASS;
}
}
- else {
- version_expected_info("Test", "OpenCL", ocl_expected_min_version.to_string().c_str(), ocl_version.to_string().c_str());
+ else
+ {
+ version_expected_info("Test", "OpenCL",
+ ocl_expected_min_version.to_string().c_str(),
+ ocl_version.to_string().c_str());
return TEST_SKIP;
}
}
bool spirv_supported = check_device_spirv_version_reported(device);
- if (ocl_version >= ocl_expected_min_version && ocl_version <= Version(2, 2)) {
- if (spirv_supported == false) {
- log_error("SPIR-V intermediate language not supported !!! OpenCL %s requires support.\n", ocl_version.to_string().c_str());
+ if (ocl_version >= ocl_expected_min_version && ocl_version <= Version(2, 2))
+ {
+ if (spirv_supported == false)
+ {
+ log_error("SPIR-V intermediate language not supported !!! OpenCL "
+ "%s requires support.\n",
+ ocl_version.to_string().c_str());
return TEST_FAIL;
}
}
- if (ocl_version > Version(2, 2)) {
- if (spirv_supported == false) {
- log_info("SPIR-V intermediate language not supported in OpenCL %s. Test skipped.\n", ocl_version.to_string().c_str());
+ if (ocl_version > Version(2, 2))
+ {
+ if (spirv_supported == false)
+ {
+ log_info("SPIR-V intermediate language not supported in OpenCL %s. "
+ "Test skipped.\n",
+ ocl_version.to_string().c_str());
return TEST_SKIP;
}
}
diff --git a/test_common/harness/testHarness.h b/test_common/harness/testHarness.h
index 6e1998f..d01c81b 100644
--- a/test_common/harness/testHarness.h
+++ b/test_common/harness/testHarness.h
@@ -137,7 +137,9 @@
Version get_device_spirv_il_version(cl_device_id device);
bool check_device_spirv_il_support(cl_device_id device);
-void version_expected_info(const char * test_name, const char * api_name, const char * expected_version, const char * device_version);
+void version_expected_info(const char *test_name, const char *api_name,
+ const char *expected_version,
+ const char *device_version);
test_status check_spirv_compilation_readiness(cl_device_id device);
@@ -146,7 +148,7 @@
extern int gIsEmbedded; // This is set to 1 if the device is an embedded device
extern int gHasLong; // This is set to 1 if the device suppots long and ulong types in OpenCL C.
extern int gIsOpenCL_C_1_0_Device; // This is set to 1 if the device supports only OpenCL C 1.0.
-extern bool gCoreILProgram;
+extern bool gCoreILProgram;
#if ! defined( __APPLE__ )
void memset_pattern4(void *, const void *, size_t);
diff --git a/test_conformance/SVM/main.cpp b/test_conformance/SVM/main.cpp
index bf492ce..3e478ec 100644
--- a/test_conformance/SVM/main.cpp
+++ b/test_conformance/SVM/main.cpp
@@ -281,7 +281,9 @@
auto version = get_device_cl_version(device);
auto expected_min_version = Version(2, 0);
if (version < expected_min_version) {
- version_expected_info("Test", "OpenCL", expected_min_version.to_string().c_str(), version.to_string().c_str());
+ version_expected_info("Test", "OpenCL",
+ expected_min_version.to_string().c_str(),
+ version.to_string().c_str());
return TEST_SKIP;
}
diff --git a/test_conformance/c11_atomics/main.cpp b/test_conformance/c11_atomics/main.cpp
index 957cce9..5208473 100644
--- a/test_conformance/c11_atomics/main.cpp
+++ b/test_conformance/c11_atomics/main.cpp
@@ -110,7 +110,9 @@
auto expected_min_version = Version(2, 0);
if (version < expected_min_version)
{
- version_expected_info("Test", "OpenCL", expected_min_version.to_string().c_str(), version.to_string().c_str());
+ version_expected_info("Test", "OpenCL",
+ expected_min_version.to_string().c_str(),
+ version.to_string().c_str());
return TEST_SKIP;
}
return TEST_PASS;
diff --git a/test_conformance/conversions/test_conversions.cpp b/test_conformance/conversions/test_conversions.cpp
index b37fb3b..b7280b4 100644
--- a/test_conformance/conversions/test_conversions.cpp
+++ b/test_conformance/conversions/test_conversions.cpp
@@ -319,10 +319,10 @@
int ret = runTestHarnessWithCheck( 1, arg, test_num, test_list, true, 0, InitCL );
free_mtdata( gMTdata );
- if (gQueue) {
+ if (gQueue)
+ {
error = clFinish(gQueue);
- if (error)
- vlog_error("clFinish failed: %d\n", error);
+ if (error) vlog_error("clFinish failed: %d\n", error);
}
clReleaseMemObject(gInBuffer);
diff --git a/test_conformance/device_execution/main.cpp b/test_conformance/device_execution/main.cpp
index a86e4a7..65115c9 100644
--- a/test_conformance/device_execution/main.cpp
+++ b/test_conformance/device_execution/main.cpp
@@ -32,7 +32,9 @@
auto version = get_device_cl_version(device);
auto expected_min_version = Version(2, 0);
if (version < expected_min_version) {
- version_expected_info("Test", "OpenCL", expected_min_version.to_string().c_str(), version.to_string().c_str());
+ version_expected_info("Test", "OpenCL",
+ expected_min_version.to_string().c_str(),
+ version.to_string().c_str());
return TEST_SKIP;
}
diff --git a/test_conformance/device_timer/main.cpp b/test_conformance/device_timer/main.cpp
index 0d4bd2f..bb413fc 100644
--- a/test_conformance/device_timer/main.cpp
+++ b/test_conformance/device_timer/main.cpp
@@ -39,7 +39,9 @@
if (version < expected_min_version)
{
- version_expected_info("Test", "OpenCL", expected_min_version.to_string().c_str(), version.to_string().c_str());
+ version_expected_info("Test", "OpenCL",
+ expected_min_version.to_string().c_str(),
+ version.to_string().c_str());
return TEST_SKIP;
}
diff --git a/test_conformance/generic_address_space/main.cpp b/test_conformance/generic_address_space/main.cpp
index e543726..0114758 100644
--- a/test_conformance/generic_address_space/main.cpp
+++ b/test_conformance/generic_address_space/main.cpp
@@ -75,7 +75,9 @@
if (version < expected_min_version)
{
- version_expected_info("Test", "OpenCL", expected_min_version.to_string().c_str(), version.to_string().c_str());
+ version_expected_info("Test", "OpenCL",
+ expected_min_version.to_string().c_str(),
+ version.to_string().c_str());
return TEST_SKIP;
}
diff --git a/test_conformance/non_uniform_work_group/main.cpp b/test_conformance/non_uniform_work_group/main.cpp
index 36e419b..64eff96 100644
--- a/test_conformance/non_uniform_work_group/main.cpp
+++ b/test_conformance/non_uniform_work_group/main.cpp
@@ -43,7 +43,9 @@
auto expected_min_version = Version(2, 0);
if (version < expected_min_version)
{
- version_expected_info("Test", "OpenCL", expected_min_version.to_string().c_str(), version.to_string().c_str());
+ version_expected_info("Test", "OpenCL",
+ expected_min_version.to_string().c_str(),
+ version.to_string().c_str());
return TEST_SKIP;
}
return TEST_PASS;
diff --git a/test_conformance/pipes/main.cpp b/test_conformance/pipes/main.cpp
index 842eb7c..b217073 100644
--- a/test_conformance/pipes/main.cpp
+++ b/test_conformance/pipes/main.cpp
@@ -24,7 +24,9 @@
auto version = get_device_cl_version(device);
auto expected_min_version = Version(2, 0);
if (version < expected_min_version) {
- version_expected_info("Test", "OpenCL", expected_min_version.to_string().c_str(), version.to_string().c_str());
+ version_expected_info("Test", "OpenCL",
+ expected_min_version.to_string().c_str(),
+ version.to_string().c_str());
return TEST_SKIP;
}
diff --git a/test_conformance/printf/test_printf.cpp b/test_conformance/printf/test_printf.cpp
index c549cce..075a276 100644
--- a/test_conformance/printf/test_printf.cpp
+++ b/test_conformance/printf/test_printf.cpp
@@ -1023,7 +1023,9 @@
auto expected_min_version = Version(1, 2);
if (version < expected_min_version)
{
- version_expected_info("Test", "OpenCL", expected_min_version.to_string().c_str(), version.to_string().c_str());
+ version_expected_info("Test", "OpenCL",
+ expected_min_version.to_string().c_str(),
+ version.to_string().c_str());
return TEST_SKIP;
}
diff --git a/test_conformance/spirv_new/main.cpp b/test_conformance/spirv_new/main.cpp
index 246864d..afcc310 100644
--- a/test_conformance/spirv_new/main.cpp
+++ b/test_conformance/spirv_new/main.cpp
@@ -154,24 +154,33 @@
}
unsigned char *buffer = &buffer_vec[0];
- if (gCoreILProgram) {
+ if (gCoreILProgram)
+ {
prog = clCreateProgramWithIL(context, buffer, file_bytes, &err);
- SPIRV_CHECK_ERROR(err, "Failed to create program with clCreateProgramWithIL");
+ SPIRV_CHECK_ERROR(
+ err, "Failed to create program with clCreateProgramWithIL");
}
- else {
+ else
+ {
cl_platform_id platform;
- err = clGetDeviceInfo(deviceID, CL_DEVICE_PLATFORM, sizeof(cl_platform_id), &platform, NULL);
- SPIRV_CHECK_ERROR(err, "Failed to get platform info with clGetDeviceInfo");
+ err = clGetDeviceInfo(deviceID, CL_DEVICE_PLATFORM,
+ sizeof(cl_platform_id), &platform, NULL);
+ SPIRV_CHECK_ERROR(err,
+ "Failed to get platform info with clGetDeviceInfo");
clCreateProgramWithILKHR_fn clCreateProgramWithILKHR = NULL;
- clCreateProgramWithILKHR = (clCreateProgramWithILKHR_fn)clGetExtensionFunctionAddressForPlatform(platform, "clCreateProgramWithILKHR");
+ clCreateProgramWithILKHR = (clCreateProgramWithILKHR_fn)
+ clGetExtensionFunctionAddressForPlatform(
+ platform, "clCreateProgramWithILKHR");
if (clCreateProgramWithILKHR == NULL)
{
- log_error("ERROR: clGetExtensionFunctionAddressForPlatform failed\n");
+ log_error(
+ "ERROR: clGetExtensionFunctionAddressForPlatform failed\n");
return -1;
}
prog = clCreateProgramWithILKHR(context, buffer, file_bytes, &err);
- SPIRV_CHECK_ERROR(err, "Failed to create program with clCreateProgramWithILKHR");
+ SPIRV_CHECK_ERROR(
+ err, "Failed to create program with clCreateProgramWithILKHR");
}
err = clBuildProgram(prog, 1, &deviceID, NULL, NULL, NULL);
@@ -185,15 +194,18 @@
test_status spirv_status;
bool force = true;
spirv_status = check_spirv_compilation_readiness(id);
- if (spirv_status != TEST_PASS) {
+ if (spirv_status != TEST_PASS)
+ {
return spirv_status;
}
cl_uint address_bits;
- cl_uint err = clGetDeviceInfo(id, CL_DEVICE_ADDRESS_BITS, sizeof(cl_uint), &address_bits, NULL);
- if(err != CL_SUCCESS){
- log_error("clGetDeviceInfo failed to get address bits!");
- return TEST_FAIL;
+ cl_uint err = clGetDeviceInfo(id, CL_DEVICE_ADDRESS_BITS, sizeof(cl_uint),
+ &address_bits, NULL);
+ if (err != CL_SUCCESS)
+ {
+ log_error("clGetDeviceInfo failed to get address bits!");
+ return TEST_FAIL;
}
gAddrWidth = address_bits == 32 ? "32" : "64";
@@ -234,8 +246,8 @@
printUsage();
}
- return runTestHarnessWithCheck(argc, argv,
- spirvTestsRegistry::getInstance().getNumTests(),
- spirvTestsRegistry::getInstance().getTestDefinitions(),
- false, 0, InitCL);
+ return runTestHarnessWithCheck(
+ argc, argv, spirvTestsRegistry::getInstance().getNumTests(),
+ spirvTestsRegistry::getInstance().getTestDefinitions(), false, 0,
+ InitCL);
}
diff --git a/test_conformance/spirv_new/test_linkage.cpp b/test_conformance/spirv_new/test_linkage.cpp
index 43e6d6f..cf518c3 100644
--- a/test_conformance/spirv_new/test_linkage.cpp
+++ b/test_conformance/spirv_new/test_linkage.cpp
@@ -33,34 +33,43 @@
}
unsigned char *buffer = &buffer_vec[0];
- if (gCoreILProgram) {
+ if (gCoreILProgram)
+ {
prog = clCreateProgramWithIL(context, buffer, file_bytes, &err);
- SPIRV_CHECK_ERROR(err, "Failed to create program with clCreateProgramWithIL");
+ SPIRV_CHECK_ERROR(
+ err, "Failed to create program with clCreateProgramWithIL");
}
- else {
+ else
+ {
cl_platform_id platform;
- err = clGetDeviceInfo(deviceID, CL_DEVICE_PLATFORM, sizeof(cl_platform_id), &platform, NULL);
- SPIRV_CHECK_ERROR(err, "Failed to get platform info with clGetDeviceInfo");
+ err = clGetDeviceInfo(deviceID, CL_DEVICE_PLATFORM,
+ sizeof(cl_platform_id), &platform, NULL);
+ SPIRV_CHECK_ERROR(err,
+ "Failed to get platform info with clGetDeviceInfo");
clCreateProgramWithILKHR_fn clCreateProgramWithILKHR = NULL;
- clCreateProgramWithILKHR = (clCreateProgramWithILKHR_fn)clGetExtensionFunctionAddressForPlatform(platform, "clCreateProgramWithILKHR");
+ clCreateProgramWithILKHR = (clCreateProgramWithILKHR_fn)
+ clGetExtensionFunctionAddressForPlatform(
+ platform, "clCreateProgramWithILKHR");
if (clCreateProgramWithILKHR == NULL)
{
- log_error("ERROR: clGetExtensionFunctionAddressForPlatform failed\n");
+ log_error(
+ "ERROR: clGetExtensionFunctionAddressForPlatform failed\n");
return -1;
}
prog = clCreateProgramWithILKHR(context, buffer, file_bytes, &err);
- SPIRV_CHECK_ERROR(err, "Failed to create program with clCreateProgramWithILKHR");
+ SPIRV_CHECK_ERROR(
+ err, "Failed to create program with clCreateProgramWithILKHR");
}
err = clCompileProgram(prog, 1, &deviceID,
NULL, // options
- 0, // num headers
+ 0, // num headers
NULL, // input headers
NULL, // header include names
NULL, // callback
- NULL // User data
- );
+ NULL // User data
+ );
SPIRV_CHECK_ERROR(err, "Failed to compile spv program");
return 0;
}
diff --git a/test_conformance/spirv_new/test_op_opaque.cpp b/test_conformance/spirv_new/test_op_opaque.cpp
index 2ea0434..067d9e4 100644
--- a/test_conformance/spirv_new/test_op_opaque.cpp
+++ b/test_conformance/spirv_new/test_op_opaque.cpp
@@ -30,34 +30,43 @@
clProgramWrapper prog;
- if (gCoreILProgram) {
+ if (gCoreILProgram)
+ {
prog = clCreateProgramWithIL(context, buffer, file_bytes, &err);
- SPIRV_CHECK_ERROR(err, "Failed to create program with clCreateProgramWithIL");
+ SPIRV_CHECK_ERROR(
+ err, "Failed to create program with clCreateProgramWithIL");
}
- else {
+ else
+ {
cl_platform_id platform;
- err = clGetDeviceInfo(deviceID, CL_DEVICE_PLATFORM, sizeof(cl_platform_id), &platform, NULL);
- SPIRV_CHECK_ERROR(err, "Failed to get platform info with clGetDeviceInfo");
+ err = clGetDeviceInfo(deviceID, CL_DEVICE_PLATFORM,
+ sizeof(cl_platform_id), &platform, NULL);
+ SPIRV_CHECK_ERROR(err,
+ "Failed to get platform info with clGetDeviceInfo");
clCreateProgramWithILKHR_fn clCreateProgramWithILKHR = NULL;
- clCreateProgramWithILKHR = (clCreateProgramWithILKHR_fn)clGetExtensionFunctionAddressForPlatform(platform, "clCreateProgramWithILKHR");
+ clCreateProgramWithILKHR = (clCreateProgramWithILKHR_fn)
+ clGetExtensionFunctionAddressForPlatform(
+ platform, "clCreateProgramWithILKHR");
if (clCreateProgramWithILKHR == NULL)
{
- log_error("ERROR: clGetExtensionFunctionAddressForPlatform failed\n");
+ log_error(
+ "ERROR: clGetExtensionFunctionAddressForPlatform failed\n");
return -1;
}
prog = clCreateProgramWithILKHR(context, buffer, file_bytes, &err);
- SPIRV_CHECK_ERROR(err, "Failed to create program with clCreateProgramWithILKHR");
+ SPIRV_CHECK_ERROR(
+ err, "Failed to create program with clCreateProgramWithILKHR");
}
err = clCompileProgram(prog, 1, &deviceID,
NULL, // options
- 0, // num headers
+ 0, // num headers
NULL, // input headers
NULL, // header include names
NULL, // callback
- NULL // User data
- );
+ NULL // User data
+ );
SPIRV_CHECK_ERROR(err, "Failed to compile spv program");
return 0;
}
diff --git a/test_conformance/workgroups/main.cpp b/test_conformance/workgroups/main.cpp
index 0c5640c..41ffa74 100644
--- a/test_conformance/workgroups/main.cpp
+++ b/test_conformance/workgroups/main.cpp
@@ -47,7 +47,9 @@
auto expected_min_version = Version(2, 0);
if (version < expected_min_version)
{
- version_expected_info("Test","OpenCL", expected_min_version.to_string().c_str(), version.to_string().c_str());
+ version_expected_info("Test", "OpenCL",
+ expected_min_version.to_string().c_str(),
+ version.to_string().c_str());
return TEST_SKIP;
}