Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Partial fixes for Clang 10 as host / cxx compiler. #1289

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion testing/memory.cu
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions thrust/random/detail/normal_distribution_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,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
const RealType S1 = static_cast<RealType>(1) / urng_range;
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)

Expand Down
4 changes: 2 additions & 2 deletions thrust/system/tbb/detail/merge.inl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion thrust/system/tbb/detail/reduce.inl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down