From 5281b4c916bd7ab540dd9c1c7a199a7dba52165f Mon Sep 17 00:00:00 2001 From: Marco Antognini Date: Wed, 24 Mar 2021 16:29:25 +0000 Subject: [PATCH] Improve consistency of clEnqueueWriteBuffer operations (#1195) Reduce differences between tests by ensuring all these operations are non-blocking. Signed-off-by: Marco Antognini --- .../math_brute_force/binary_two_results_i_double.cpp | 12 ++++++------ .../math_brute_force/binary_two_results_i_float.cpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test_conformance/math_brute_force/binary_two_results_i_double.cpp b/test_conformance/math_brute_force/binary_two_results_i_double.cpp index f1a27ee36e..d71585e65f 100644 --- a/test_conformance/math_brute_force/binary_two_results_i_double.cpp +++ b/test_conformance/math_brute_force/binary_two_results_i_double.cpp @@ -210,14 +210,14 @@ int TestFunc_DoubleI_Double_Double(const Func *f, MTdata d, bool relaxedMode) p2[j] = DoubleFromUInt32(genrand_int32(d)); } - if ((error = clEnqueueWriteBuffer(gQueue, gInBuffer, CL_TRUE, 0, + if ((error = clEnqueueWriteBuffer(gQueue, gInBuffer, CL_FALSE, 0, bufferSize, gIn, 0, NULL, NULL))) { vlog_error("\n*** Error %d in clEnqueueWriteBuffer ***\n", error); return error; } - if ((error = clEnqueueWriteBuffer(gQueue, gInBuffer2, CL_TRUE, 0, + if ((error = clEnqueueWriteBuffer(gQueue, gInBuffer2, CL_FALSE, 0, bufferSize, gIn2, 0, NULL, NULL))) { vlog_error("\n*** Error %d in clEnqueueWriteBuffer2 ***\n", error); @@ -230,7 +230,7 @@ int TestFunc_DoubleI_Double_Double(const Func *f, MTdata d, bool relaxedMode) uint32_t pattern = 0xffffdead; memset_pattern4(gOut[j], &pattern, bufferSize); if ((error = - clEnqueueWriteBuffer(gQueue, gOutBuffer[j], CL_TRUE, 0, + clEnqueueWriteBuffer(gQueue, gOutBuffer[j], CL_FALSE, 0, bufferSize, gOut[j], 0, NULL, NULL))) { vlog_error("\n*** Error %d in clEnqueueWriteBuffer2(%d) ***\n", @@ -240,7 +240,7 @@ int TestFunc_DoubleI_Double_Double(const Func *f, MTdata d, bool relaxedMode) memset_pattern4(gOut2[j], &pattern, bufferSize); if ((error = - clEnqueueWriteBuffer(gQueue, gOutBuffer2[j], CL_TRUE, 0, + clEnqueueWriteBuffer(gQueue, gOutBuffer2[j], CL_FALSE, 0, bufferSize, gOut2[j], 0, NULL, NULL))) { vlog_error("\n*** Error %d in clEnqueueWriteBuffer2b(%d) ***\n", @@ -573,13 +573,13 @@ int TestFunc_DoubleI_Double_Double(const Func *f, MTdata d, bool relaxedMode) double *p = (double *)gIn; for (j = 0; j < bufferSize / sizeof(cl_double); j++) p[j] = DoubleFromUInt32(genrand_int32(d)); - if ((error = clEnqueueWriteBuffer(gQueue, gInBuffer, CL_TRUE, 0, + if ((error = clEnqueueWriteBuffer(gQueue, gInBuffer, CL_FALSE, 0, bufferSize, gIn, 0, NULL, NULL))) { vlog_error("\n*** Error %d in clEnqueueWriteBuffer ***\n", error); return error; } - if ((error = clEnqueueWriteBuffer(gQueue, gInBuffer2, CL_TRUE, 0, + if ((error = clEnqueueWriteBuffer(gQueue, gInBuffer2, CL_FALSE, 0, bufferSize, gIn2, 0, NULL, NULL))) { vlog_error("\n*** Error %d in clEnqueueWriteBuffer2 ***\n", error); diff --git a/test_conformance/math_brute_force/binary_two_results_i_float.cpp b/test_conformance/math_brute_force/binary_two_results_i_float.cpp index 9db5c1c1c2..b6f1f1bdf0 100644 --- a/test_conformance/math_brute_force/binary_two_results_i_float.cpp +++ b/test_conformance/math_brute_force/binary_two_results_i_float.cpp @@ -218,7 +218,7 @@ int TestFunc_FloatI_Float_Float(const Func *f, MTdata d, bool relaxedMode) return error; } - if ((error = clEnqueueWriteBuffer(gQueue, gInBuffer2, CL_TRUE, 0, + if ((error = clEnqueueWriteBuffer(gQueue, gInBuffer2, CL_FALSE, 0, bufferSize, gIn2, 0, NULL, NULL))) { vlog_error("\n*** Error %d in clEnqueueWriteBuffer2 ***\n", error);