diff options
author | Pan Xiuli <xiuli.pan@intel.com> | 2016-08-08 11:31:19 +0800 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2016-08-12 18:16:23 +0800 |
commit | ccf1f13e1218f94ac77e47a6e32b1ddda88796a7 (patch) | |
tree | c4ca3fdbd759eaea3a8b55969a83703679a8901b /utests/utest_helper.hpp | |
parent | 7e2a964816fdd9bebb43ecf587445c34b404d055 (diff) | |
download | beignet-ccf1f13e1218f94ac77e47a6e32b1ddda88796a7.tar.gz |
Utest: Move half related helper function into utest helper
For more half related tests, need to use helper funciton in utest.
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 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/utests/utest_helper.hpp b/utests/utest_helper.hpp index 421e356a..561c2c4a 100644 --- a/utests/utest_helper.hpp +++ b/utests/utest_helper.hpp @@ -299,4 +299,11 @@ extern clGetKernelSubGroupInfoKHR_cb* utestclGetKernelSubGroupInfoKHR; /* Check is cl version 2.0. */ extern int cl_check_ocl20(void); + +/* Check is FP16 enabled. */ +extern int cl_check_half(void); + +/* Helper function for half type numbers */ +extern uint32_t __half_to_float(uint16_t h, bool* isInf = NULL, bool* infSign = NULL); +extern uint16_t __float_to_half(uint32_t x); #endif /* __UTEST_HELPER_HPP__ */ |