2 #include
<clc
/clcmacro.h
>
5 *log
(x) = log2
(x) * (1/log2
(e))
8 _CLC_OVERLOAD _CLC_DEF float log
(float x
)
10 return log2
(x) * (1.0f
/ M_LOG2E_F
);
13 _CLC_UNARY_VECTORIZE
(_CLC_OVERLOAD _CLC_DEF
, float
, log
, float
);
17 #pragma OPENCL EXTENSION cl_khr_fp64
: enable
19 _CLC_OVERLOAD _CLC_DEF double log
(double x
)
21 return log2
(x) * (1.0
/ M_LOG2E
);
24 _CLC_UNARY_VECTORIZE
(_CLC_OVERLOAD _CLC_DEF
, double
, log
, double
);