Correct indents
MODIFY
test/test_max_element.cpp
test/test_max_element.cpp
#include "test_utils.hpp"
-template<
-class InputType
->
+template <class InputType>
struct Params
{
using input_type = InputType;
@@ -101,8 +99,7 @@ TYPED_TEST(MaxElementTests, TestMaxElementWithTransform)
using T = typename Vector::value_type;
// We cannot use unsigned types for this test case
- if (std::is_unsigned<T>::value)
- return;
+ if (std::is_unsigned<T>::value) return;
Vector data(6);
data[0] = 3;

MODIFY
test/test_min_element.cpp
test/test_min_element.cpp
#include "test_utils.hpp"
-template<
-class InputType
->
+template <class InputType>
struct Params
{
using input_type = InputType;
@@ -101,8 +99,7 @@ TYPED_TEST(MinElementTests, TestMinElementWithTransform)
using T = typename Vector::value_type;
// We cannot use unsigned types for this test case
- if (std::is_unsigned<T>::value)
- return;
+ if (std::is_unsigned<T>::value) return;
Vector data(6);
data[0] = 3;
@@ -119,7 +116,6 @@ TYPED_TEST(MinElementTests, TestMinElementWithTransform)
thrust::make_transform_iterator(data.begin(), thrust::negate<T>()),
thrust::make_transform_iterator(data.end(), thrust::negate<T>()),
thrust::greater<T>()), -1);
-
}
TYPED_TEST(MinElementTests, TestMinElement)

MODIFY
test/test_minmax_element.cpp
test/test_minmax_element.cpp
#include "test_utils.hpp"
-template<
-class InputType
->
+template <class InputType>
struct Params
{
using input_type = InputType;
@@ -99,8 +97,7 @@ TYPED_TEST(MinmaxElementTests, TestMinmaxElementWithTransform)
using T = typename Vector::value_type;
// We cannot use unsigned types for this test case
- if (std::is_unsigned<T>::value)
- return;
+ if (std::is_unsigned<T>::value) return;
Vector data(6);
data[0] = 3;

MODIFY
thrust/system/hip/detail/extrema.h
thrust/system/hip/detail/extrema.h
@@ -44,7 +44,9 @@ namespace hip_rocprim {
namespace __extrema {
- template <class InputType, class IndexType, class Predicate>
+ template <class InputType,
+ class IndexType,
+ class Predicate>
struct arg_min_f
{
Predicate predicate;
@@ -75,7 +77,9 @@ namespace hip_rocprim {
}
}; // struct arg_min_f
- template <class InputType, class IndexType, class Predicate>
+ template <class InputType,
+ class IndexType,
+ class Predicate>
struct arg_max_f
{
Predicate predicate;
@@ -106,7 +110,9 @@ namespace hip_rocprim {
}
}; // struct arg_max_f
- template<class InputType, class IndexType, class Predicate>
+ template<class InputType,
+ class IndexType,
+ class Predicate>
struct arg_minmax_f
{
Predicate predicate;
@@ -232,7 +238,6 @@ namespace hip_rocprim {
return first + thrust::get<1>(result);
}
-
} // namespace __extrema
@@ -280,7 +285,6 @@ namespace hip_rocprim {
}
/// max element
-
__thrust_exec_check_disable__
template <class Derived,
class ItemsIt,
@@ -322,7 +326,6 @@ namespace hip_rocprim {
}
/// minmax element
-
__thrust_exec_check_disable__
template <class Derived,
class ItemsIt,
@@ -345,10 +348,7 @@ namespace hip_rocprim {
typedef typename arg_minmax_t::two_pairs_type two_pairs_type;
typedef typename arg_minmax_t::duplicate_tuple duplicate_t;
- typedef transform_input_iterator_t<two_pairs_type,
- zip_iterator,
- duplicate_t>
- transform_t;
+ typedef transform_input_iterator_t<two_pairs_type, zip_iterator, duplicate_t> transform_t;
THRUST_HIP_PRESERVE_KERNELS_WORKAROUND((
__extrema::extrema<Derived, transform_t, IndexType, arg_minmax_t, two_pairs_type>
@@ -367,14 +367,17 @@ namespace hip_rocprim {
num_items,
arg_minmax_t(binary_pred),
(two_pairs_type *)(NULL));
+
ret = thrust::make_pair(first + get<1>(get<0>(result)),
first + get<1>(get<1>(result)));
+
#else // __THRUST_HAS_HIPRT__
ret = thrust::minmax_element(cvt_to_seq(derived_cast(policy)),
first,
last,
binary_pred);
#endif // __THRUST_HAS_HIPRT__
+
return ret;
}

Correct indents