-
Notifications
You must be signed in to change notification settings - Fork 11
distance()
JiPi edited this page Mar 4, 2021
·
1 revision
Missing in Cuda, so it has to be impelmented. Unfortunately, there are two cases:
#if defined(DEVICE_IS_CUDA)
#define distance_f(pt1,pt2) (_fabs(pt1-pt2))
#define distance_fx(pt1,pt2) (_sqrtf(dot(pt2-pt1,pt2-pt1)))
#else
#define distance_f(pt1,pt2) (distance(pt1,pt2))
#define distance_fx(pt1,pt2) (distance(pt1,pt2))
#endif