Synchronise with Khronos-private Gitlab branch

The maintenance of the conformance tests is moving to Github.

This commit contains all the changes that have been done in
Gitlab since the first public release of the conformance tests.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
This commit is contained in:
Kevin Petit
2019-02-20 16:10:04 +00:00
committed by Kévin Petit
parent b1603eb6ba
commit 53db6e7f9f
115 changed files with 2632 additions and 1304 deletions

View File

@@ -17,10 +17,15 @@
#include "../../test_common/harness/mt19937.h"
#include <vector>
#include <atomic>
#if !defined(_WIN32)
#include <unistd.h>
#endif
typedef struct
{
cl_uint status;
std::atomic<cl_uint> status;
cl_uint num_svm_pointers;
std::vector<void *> svm_pointers;
} CallbackData;
@@ -62,7 +67,7 @@ void CL_CALLBACK callback_svm_free(cl_command_queue queue, cl_uint num_svm_point
clSVMFree(context, svm_pointers[i]);
}
data->status = 1;
data->status.store(1, std::memory_order_release);
}
int test_enqueue_api(cl_device_id deviceID, cl_context c, cl_command_queue queue, int num_elements)
@@ -231,7 +236,9 @@ int test_enqueue_api(cl_device_id deviceID, cl_context c, cl_command_queue queue
test_error(error, "clFinish failed");
//wait for the callback
while(data.status == 0) { }
while(data.status.load(std::memory_order_acquire) == 0) {
usleep(1);
}
//check if number of SVM pointers returned in the callback matches with expected
if (data.num_svm_pointers != buffers.size())