 #include "cupy_thrust.h"
 
 
-using namespace thrust;
-
-
 #if CUPY_USE_HIP
 typedef hipStream_t cudaStream_t;
 namespace cuda {
     using thrust::hip::par;
 }
-
+#else // #if CUPY_USE_HIP
+namespace cuda {
+    using thrust::cuda::par;
+}
 #endif // #if CUPY_USE_HIP
 
 

#if (__CUDACC_VER_MAJOR__ >11 || (__CUDACC_VER_MAJOR__ == 11 && __CUDACC_VER_MINOR__ >= 2) || HIP_VERSION >= 402)
THRUST_OPTIONAL_CPP11_CONSTEXPR_LESS
#endif
bool less<complex<float>>::operator() (
    const complex<float>& lhs, const complex<float>& rhs) const {

    return _cmp_less<complex<float>>(lhs, rhs);

#if (__CUDACC_VER_MAJOR__ >11 || (__CUDACC_VER_MAJOR__ == 11 && __CUDACC_VER_MINOR__ >= 2) || HIP_VERSION >= 402)
THRUST_OPTIONAL_CPP11_CONSTEXPR_LESS
#endif
bool thrust::less< thrust::tuple<size_t, complex<float>> >::operator() (
    const thrust::tuple<size_t, complex<float>>& lhs, const thrust::tuple<size_t, complex<float>>& rhs) const {

    return _tuple_less<complex<float>>(lhs, rhs);
}
