Update hip bakcend and tests
MODIFY
.gitlab-ci.yml
.gitlab-ci.yml
@@ -37,7 +37,7 @@ build:rocm:
script:
- mkdir build
- cd build
- - CXX=hipcc cmake -DBUILD_TEST=ON -DCMAKE_CXX_FLAGS="-w" ../.
+ - CXX=hipcc cmake -DBUILD_TEST=ON ../.
- make -j $(nproc)
- make package
artifacts:

MODIFY
test/test_fill.cpp
test/test_fill.cpp
@@ -394,6 +394,10 @@ struct TypeWithNonTrivialAssigment
{
}
+#if THRUST_CPP_DIALECT >= 2011
+ TypeWithNonTrivialAssigment(const TypeWithNonTrivialAssigment &) = default;
+#endif
+
__host__ __device__ TypeWithNonTrivialAssigment& operator=(const TypeWithNonTrivialAssigment& t)
{
x = t.x;

MODIFY
test/test_swap_ranges.cpp
test/test_swap_ranges.cpp
@@ -181,6 +181,10 @@ struct type_with_swap
return m_x == other.m_x && m_swapped == other.m_swapped;
}
+#if THRUST_CPP_DIALECT >= 2011
+ type_with_swap & operator=(const type_with_swap &) = default;
+#endif
+
int m_x;
bool m_swapped;
};

MODIFY
thrust/iterator/discard_iterator.h
thrust/iterator/discard_iterator.h
@@ -171,5 +171,4 @@ discard_iterator<> make_discard_iterator(discard_iterator<>::difference_type i =
} // end namespace thrust
-THRUST_DISABLE_MSVC_POSSIBLE_LOSS_OF_DATA_WARNING_END
-
+__THRUST_DISABLE_MSVC_POSSIBLE_LOSS_OF_DATA_WARNING_END

MODIFY
thrust/system/hip/detail/util.h
thrust/system/hip/detail/util.h
@@ -161,6 +161,11 @@ struct transform_input_iterator_t
{
}
+#if THRUST_CPP_DIALECT >= 2011
+ transform_input_iterator_t(const self_t &) = default;
+#endif
+
+
/// Postfix increment
THRUST_HIP_FUNCTION self_t operator++(int)
{

MODIFY
thrust/system/hip/detail/vector.inl
thrust/system/hip/detail/vector.inl
@@ -48,6 +48,14 @@ vector<T, Allocator>::vector(const vector& x)
{
}
+#if __cplusplus >= 201103L
+ template<typename T, typename Allocator>
+ vector<T,Allocator>
+ ::vector(vector &&x)
+ : super_t(std::move(x))
+ {}
+#endif
+
template <typename T, typename Allocator>
template <typename OtherT, typename OtherAllocator>
vector<T, Allocator>::vector(const thrust::detail::vector_base<OtherT, OtherAllocator>& x)
@@ -69,6 +77,26 @@ vector<T, Allocator>::vector(InputIterator first, InputIterator last)
{
}
+template<typename T, typename Allocator>
+ vector<T,Allocator> &
+ vector<T,Allocator>
+ ::operator=(const vector &x)
+{
+ super_t::operator=(x);
+ return *this;
+}
+
+#if __cplusplus >= 201103L
+ template<typename T, typename Allocator>
+ vector<T,Allocator> &
+ vector<T,Allocator>
+ ::operator=(vector &&x)
+ {
+ super_t::operator=(std::move(x));
+ return *this;
+ }
+#endif
+
template <typename T, typename Allocator>
template <typename OtherT, typename OtherAllocator>
vector<T, Allocator>&

MODIFY
thrust/system/hip/memory.h
thrust/system/hip/memory.h
@@ -155,6 +155,10 @@ public:
__host__ __device__
inline allocator(const allocator<U> & other) : base(other) {}
+#if THRUST_CPP_DIALECT >= 2011
+ allocator & operator=(const allocator &) = default;
+#endif
+
/*! Destructor has no effect.
*/
__host__ __device__

MODIFY
thrust/system/hip/vector.h
thrust/system/hip/vector.h
@@ -94,6 +94,13 @@ template<typename T, typename Allocator = allocator<T> >
*/
vector(const vector &x);
+#if __cplusplus >= 201103L
+ /*! Move constructor moves from over another \p cuda::vector.
+ * \param x The other \p cuda::vector to move from.
+ */
+ vector(vector &&x);
+#endif
+
/*! This constructor copies from another Thrust vector-like object.
* \param x The other object to copy from.
*/
@@ -113,6 +120,20 @@ template<typename T, typename Allocator = allocator<T> >
template<typename InputIterator>
vector(InputIterator first, InputIterator last);
+ /*! Assignment operator assigns from another \p cuda::vector.
+ * \param x The other object to assign from.
+ * \return <tt>*this</tt>
+ */
+ vector &operator=(const vector &x);
+
+ #if __cplusplus >= 201103L
+ /*! Move assignment operator moves from another \p cuda::vector.
+ * \param x The other \p cuda::vector to move from.
+ * \return <tt>*this</tt>
+ */
+ vector &operator=(vector &&x);
+ #endif
+
// XXX vector_base should take a Derived type so we don't have to define these superfluous assigns
//
/*! Assignment operator assigns from a \c std::vector.

Update hip bakcend and tests