1 2 3 4 5 6 7 8 9 10
#pragma OPENCL EXTENSION cl_khr_fp16 : enable kernel void compiler_half_isnan(global half2 *src, global short2 *dst) { int i = get_global_id(0); dst[i] = isnan(src[i]); } kernel void compiler_half_isinf(global half *src, global int *dst) { int i = get_global_id(0); dst[i] = isinf(src[i]); }