Partial fixes for Clang 10 as host / cxx compiler.
This fixes some of the issues, but not all.
See discussion in or the following NVBug for details.
Bug
MODIFY
testing/memory.cu
testing/memory.cu
@@ -92,7 +92,7 @@ get_temporary_buffer(my_new_temporary_allocation_system, std::ptrdiff_t)
}
template<typename Pointer>
-void return_temporary_buffer(my_new_temporary_allocation_system, Pointer p)
+void return_temporary_buffer(my_new_temporary_allocation_system, Pointer)
{
// This should never be called (the three-argument with size overload below
// should be preferred) and shouldn't be ambiguous.

MODIFY
thrust/random/detail/normal_distribution_base.h
thrust/random/detail/normal_distribution_base.h
@@ -52,15 +52,12 @@ template<typename RealType>
__host__ __device__
RealType sample(UniformRandomNumberGenerator &urng, const RealType mean, const RealType stddev)
{
- typedef typename UniformRandomNumberGenerator::result_type uint_type;
- const uint_type urng_range = UniformRandomNumberGenerator::max - UniformRandomNumberGenerator::min;
+ using uint_type = typename UniformRandomNumberGenerator::result_type;
+ constexpr uint_type urng_range = UniformRandomNumberGenerator::max - UniformRandomNumberGenerator::min;
// Constants for conversion
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wimplicit-int-float-conversion"
- const RealType S1 = static_cast<RealType>(1) / urng_range;
-#pragma GCC diagnostic pop
- const RealType S2 = S1 / 2;
+ constexpr RealType S1 = static_cast<RealType>(1. / static_cast<double>(urng_range));
+ constexpr RealType S2 = S1 / 2;
RealType S3 = static_cast<RealType>(-1.4142135623730950488016887242097); // -sqrt(2)

MODIFY
thrust/system/tbb/detail/merge.inl
thrust/system/tbb/detail/merge.inl
@@ -225,7 +225,7 @@ template<typename DerivedPolicy,
typename InputIterator2,
typename OutputIterator,
typename StrictWeakOrdering>
-OutputIterator merge(execution_policy<DerivedPolicy> &exec,
+OutputIterator merge(execution_policy<DerivedPolicy> &,
InputIterator1 first1,
InputIterator1 last1,
InputIterator2 first2,
@@ -254,7 +254,7 @@ template <typename DerivedPolicy,
typename OutputIterator2,
typename StrictWeakOrdering>
thrust::pair<OutputIterator1,OutputIterator2>
- merge_by_key(execution_policy<DerivedPolicy> &exec,
+ merge_by_key(execution_policy<DerivedPolicy> &,
InputIterator1 keys_first1,
InputIterator1 keys_last1,
InputIterator2 keys_first2,

MODIFY
thrust/system/tbb/detail/reduce.inl
thrust/system/tbb/detail/reduce.inl
@@ -100,7 +100,7 @@ template<typename DerivedPolicy,
typename InputIterator,
typename OutputType,
typename BinaryFunction>
- OutputType reduce(execution_policy<DerivedPolicy> &exec,
+ OutputType reduce(execution_policy<DerivedPolicy> &,
InputIterator begin,
InputIterator end,
OutputType init,

Partial fixes for Clang 10 as host / cxx compiler.

This fixes some of the issues, but not all.

See discussion in #1268 or the following NVBug for details.

Bug 200636681