mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-23 07:39:01 +00:00
Use float<->half conversion routines from the OpenCL headers (#884)
* Use float<->half conversion routines from the OpenCL headers Fixes #870 Signed-off-by: Kevin Petit <kevin.petit@arm.com> * Use cl_half_from_double * Fix windows build errors * Fix more build errors * Code formatting * Remove TEST class
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "../funcs_test_utils.hpp"
|
||||
|
||||
#include "half_utils.hpp"
|
||||
#include <CL/cl_half.h>
|
||||
|
||||
// Generates cl_half input
|
||||
std::vector<cl_half> generate_half_input(size_t count,
|
||||
@@ -36,7 +37,7 @@ std::vector<cl_half> generate_half_input(size_t count,
|
||||
std::uniform_real_distribution<cl_float> dis(min, max);
|
||||
for(auto& i : input)
|
||||
{
|
||||
i = float2half_rte(dis(gen));
|
||||
i = cl_half_from_float(dis(gen), CL_HALF_RTE);
|
||||
}
|
||||
|
||||
input.insert(input.begin(), special_cases.begin(), special_cases.end());
|
||||
|
||||
Reference in New Issue
Block a user