Fix "undefined reference to ..sqrt.." on HIP-clang
It seems that HIP-clang doesn't calculate `sqrt(2)` in compile-time
because of __device__ sqrt(enable_if<int>) overload in HIP
causing this linking error:
test_scan_by_key.cpp:(.text.startup+0x31): undefined reference to
`_ZL4sqrtIiEN15__hip_enable_ifIXsr3std14numeric_limitsIT_EE10is_integerEdE4typeES1_'.
MODIFY
thrust/random/detail/erfcinv.h
thrust/random/detail/erfcinv.h
@@ -23,7 +23,7 @@ POSSIBILITY OF SUCH DAMAGE.
/* sqrt(2pi) */
static double s2pi = 2.50662827463100050242E0;
-static const double one_o_sqrt2 = (1/sqrt(2));
+static const double one_o_sqrt2 = (1/sqrt(2.0));
/* approximation for 0 <= |y - 0.5| <= 3/8 */
static double P0[5] = {

Fix "undefined reference to ..sqrt.." on HIP-clang

It seems that HIP-clang doesn't calculate `sqrt(2)` in compile-time
because of __device__ sqrt(enable_if<int>) overload in HIP
causing this linking error:
test_scan_by_key.cpp:(.text.startup+0x31): undefined reference to
`_ZL4sqrtIiEN15__hip_enable_ifIXsr3std14numeric_limitsIT_EE10is_integerEdE4typeES1_'.