-
Notifications
You must be signed in to change notification settings - Fork 11
sign()
it's /me edited this page Mar 2, 2021
·
2 revisions
The function sign() is defined in Metal as well as in OpenCL, but must be implemented for Cuda.
#ifdef DEVICE_IS_CUDA
__DEVICE__ inline float sign(float x) { return (x<0.0f ? -1.0f : (x>0.0f ? 1.0f : 0.0f)); }
#endif