diff options
author | Pan Xiuli <xiuli.pan@intel.com> | 2016-06-16 05:55:24 +0800 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2016-07-15 18:25:06 +0800 |
commit | e606e2da5445e3103f5d106d0582d18a755e45a9 (patch) | |
tree | cd0e223bb72493ce16949ba68243476acb583e21 /utests/utest_helper.hpp | |
parent | 41020e3d184117ba4f81a49d07c7e0c3bbdeddc8 (diff) | |
download | beignet-e606e2da5445e3103f5d106d0582d18a755e45a9.tar.gz |
Utest: Add check for cl_intel_subgroups extension tests
These tests can only run with cl_intel_subgroups extension, add check
before runing the tests. Also refine the call of the extension API with
function pointer.
V2: Use clGetExtensionFunctionAddress to get extension API function
Signed-off-by: Pan Xiuli <xiuli.pan@intel.com>
Reviewed-by: Yang Rong <rong.r.yang@intel.com>
Diffstat (limited to 'utests/utest_helper.hpp')
-rw-r--r-- | utests/utest_helper.hpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/utests/utest_helper.hpp b/utests/utest_helper.hpp index a89f197f..7d050569 100644 --- a/utests/utest_helper.hpp +++ b/utests/utest_helper.hpp @@ -287,5 +287,13 @@ extern int cl_check_double(void); /* Check is beignet device. */ extern int cl_check_beignet(void); -#endif /* __UTEST_HELPER_HPP__ */ +/* Check is intel subgroups enabled. */ +extern int cl_check_subgroups(void); + +typedef cl_int(clGetKernelSubGroupInfoKHR_cb)(cl_kernel, cl_device_id, + cl_kernel_sub_group_info, size_t, + const void *, size_t, void *, + size_t *); +extern clGetKernelSubGroupInfoKHR_cb* utestclGetKernelSubGroupInfoKHR; +#endif /* __UTEST_HELPER_HPP__ */ |