mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-25 16:29:03 +00:00
[NFC] atomics: Remove set-but-unused "succeed" variables (#1517)
The "succeed" variables are never read and they don't seem to serve any purpose that's not already provided by the "fail" variables. In `add_index_bin_test` the "fail" variable is also set but unused, but that may require an actual fix, so leaving that out of this commit. Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com> Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
committed by
GitHub
parent
9bf6486352
commit
c69f6eec47
@@ -40,7 +40,7 @@ int test_atomic_add_index(cl_device_id deviceID, cl_context context,
|
|||||||
clKernelWrapper kernel;
|
clKernelWrapper kernel;
|
||||||
clMemWrapper counter, counters;
|
clMemWrapper counter, counters;
|
||||||
size_t numGlobalThreads, numLocalThreads;
|
size_t numGlobalThreads, numLocalThreads;
|
||||||
int fail = 0, succeed = 0, err;
|
int fail = 0, err;
|
||||||
|
|
||||||
/* Check if atomics are supported. */
|
/* Check if atomics are supported. */
|
||||||
if (!is_extension_available(deviceID, "cl_khr_global_int32_base_atomics"))
|
if (!is_extension_available(deviceID, "cl_khr_global_int32_base_atomics"))
|
||||||
@@ -85,7 +85,6 @@ int test_atomic_add_index(cl_device_id deviceID, cl_context context,
|
|||||||
log_error(
|
log_error(
|
||||||
"add_index_test FAILED to allocate memory for initial values.\n");
|
"add_index_test FAILED to allocate memory for initial values.\n");
|
||||||
fail = 1;
|
fail = 1;
|
||||||
succeed = -1;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -104,7 +103,6 @@ int test_atomic_add_index(cl_device_id deviceID, cl_context context,
|
|||||||
"add_index_test FAILED to write initial values to arrays: %d\n",
|
"add_index_test FAILED to write initial values to arrays: %d\n",
|
||||||
err);
|
err);
|
||||||
fail = 1;
|
fail = 1;
|
||||||
succeed = -1;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -115,7 +113,6 @@ int test_atomic_add_index(cl_device_id deviceID, cl_context context,
|
|||||||
log_error("add_index_test FAILED to set kernel arguments: %d\n",
|
log_error("add_index_test FAILED to set kernel arguments: %d\n",
|
||||||
err);
|
err);
|
||||||
fail = 1;
|
fail = 1;
|
||||||
succeed = -1;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -127,7 +124,6 @@ int test_atomic_add_index(cl_device_id deviceID, cl_context context,
|
|||||||
log_error("add_index_test FAILED to execute kernel: %d\n",
|
log_error("add_index_test FAILED to execute kernel: %d\n",
|
||||||
err);
|
err);
|
||||||
fail = 1;
|
fail = 1;
|
||||||
succeed = -1;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -140,7 +136,6 @@ int test_atomic_add_index(cl_device_id deviceID, cl_context context,
|
|||||||
"add_index_test FAILED to read back results: %d\n",
|
"add_index_test FAILED to read back results: %d\n",
|
||||||
err);
|
err);
|
||||||
fail = 1;
|
fail = 1;
|
||||||
succeed = -1;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -161,7 +156,6 @@ int test_atomic_add_index(cl_device_id deviceID, cl_context context,
|
|||||||
"instances (%d!=1) for counter %d.\n",
|
"instances (%d!=1) for counter %d.\n",
|
||||||
instances_found, looking_for);
|
instances_found, looking_for);
|
||||||
fail = 1;
|
fail = 1;
|
||||||
succeed = -1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -208,7 +202,6 @@ int add_index_bin_test(size_t *global_threads, cl_command_queue queue,
|
|||||||
int max_counts_per_bin = divisor * 2;
|
int max_counts_per_bin = divisor * 2;
|
||||||
|
|
||||||
int fail = 0;
|
int fail = 0;
|
||||||
int succeed = 0;
|
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
clProgramWrapper program;
|
clProgramWrapper program;
|
||||||
@@ -353,7 +346,6 @@ int add_index_bin_test(size_t *global_threads, cl_command_queue queue,
|
|||||||
log_error("add_index_bin_test FAILED to set kernel arguments: %d\n",
|
log_error("add_index_bin_test FAILED to set kernel arguments: %d\n",
|
||||||
err);
|
err);
|
||||||
fail = 1;
|
fail = 1;
|
||||||
succeed = -1;
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -363,7 +355,6 @@ int add_index_bin_test(size_t *global_threads, cl_command_queue queue,
|
|||||||
{
|
{
|
||||||
log_error("add_index_bin_test FAILED to execute kernel: %d\n", err);
|
log_error("add_index_bin_test FAILED to execute kernel: %d\n", err);
|
||||||
fail = 1;
|
fail = 1;
|
||||||
succeed = -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cl_int *final_bin_assignments =
|
cl_int *final_bin_assignments =
|
||||||
@@ -382,7 +373,6 @@ int add_index_bin_test(size_t *global_threads, cl_command_queue queue,
|
|||||||
{
|
{
|
||||||
log_error("add_index_bin_test FAILED to read back bins: %d\n", err);
|
log_error("add_index_bin_test FAILED to read back bins: %d\n", err);
|
||||||
fail = 1;
|
fail = 1;
|
||||||
succeed = -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cl_int *final_bin_counts =
|
cl_int *final_bin_counts =
|
||||||
@@ -401,7 +391,6 @@ int add_index_bin_test(size_t *global_threads, cl_command_queue queue,
|
|||||||
log_error("add_index_bin_test FAILED to read back bin_counters: %d\n",
|
log_error("add_index_bin_test FAILED to read back bin_counters: %d\n",
|
||||||
err);
|
err);
|
||||||
fail = 1;
|
fail = 1;
|
||||||
succeed = -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Verification.
|
// Verification.
|
||||||
|
|||||||
Reference in New Issue
Block a user