blob: dc22766474d6491e145bd488bff55a8f7f795088 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
#pragma OPENCL EXTENSION cl_khr_fp16 : enable
kernel void compiler_half_basic(global half *src, global half *dst) {
int i = get_global_id(0);
half hf = 2.5;
half val = src[i];
val = val + hf;
val = val*val;
val = val/(half)1.8;
dst[i] = val;
}
|