additional functions needed for nearestDSmax_RE.cu