1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

add explicit cast for half

This commit is contained in:
Tomoaki Teshima
2020-09-18 21:04:24 +09:00
parent e668cff573
commit f77c2d700f
+1 -1
View File
@@ -114,6 +114,6 @@ __kernel void clip(const int nthreads,
for (int index = get_global_id(0); index < nthreads; index += get_global_size(0))
{
Dtype4 vec = vload4(index, dst);
vstore4(clamp(vec, 0.0f, 1.0f), index, dst);
vstore4(clamp(vec, (Dtype)0.0f, (Dtype)1.0f), index, dst);
}
}