Commit 3eccf1a7 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Workaround for inherited operator= in vectors due to CUDA 11

parent 35a06f86
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -49,7 +49,9 @@ public:

   // inherit all constructors and assignment operators from Array
   using BaseType::DistributedArray;
#if !defined(__CUDACC_VER_MAJOR__) || __CUDACC_VER_MAJOR__ < 11
   using BaseType::operator=;
#endif

   DistributedVector() = default;

+2 −0
Original line number Diff line number Diff line
@@ -51,7 +51,9 @@ public:

   // inherit all constructors and assignment operators from ArrayView
   using BaseType::DistributedArrayView;
#if !defined(__CUDACC_VER_MAJOR__) || __CUDACC_VER_MAJOR__ < 11
   using BaseType::operator=;
#endif

   // In C++14, default constructors cannot be inherited, although Clang
   // and GCC since version 7.0 inherit them.
+2 −0
Original line number Diff line number Diff line
@@ -64,7 +64,9 @@ public:

   //! Constructors and assignment operators are inherited from the class \ref StaticArray.
   using StaticArray< Size, Real >::StaticArray;
#if !defined(__CUDACC_VER_MAJOR__) || __CUDACC_VER_MAJOR__ < 11
   using StaticArray< Size, Real >::operator=;
#endif

   /**
    * \brief Constructor from binary vector expression.
+2 −0
Original line number Diff line number Diff line
@@ -194,6 +194,7 @@ public:
    */
   // operator= from the base class should be hidden according to the C++14 standard,
   // although GCC does not do that - see https://stackoverflow.com/q/57322624
#if !defined(__CUDACC_VER_MAJOR__) || __CUDACC_VER_MAJOR__ < 11
   template< typename T,
             typename...,
             typename = std::enable_if_t< std::is_convertible< T, Real >::value || IsArrayType< T >::value > >
@@ -202,6 +203,7 @@ public:
   {
      return Array< Real, Device, Index, Allocator >::operator=(data);
   }
#endif

   /**
    * \brief Adds elements of this vector and a vector expression and
+2 −0
Original line number Diff line number Diff line
@@ -148,6 +148,7 @@ public:
    */
   // operator= from the base class should be hidden according to the C++14 standard,
   // although GCC does not do that - see https://stackoverflow.com/q/57322624
#if !defined(__CUDACC_VER_MAJOR__) || __CUDACC_VER_MAJOR__ < 11
   template< typename T,
             typename...,
             typename = std::enable_if_t< std::is_convertible< T, Real >::value || IsArrayType< T >::value > >
@@ -156,6 +157,7 @@ public:
   {
      return ArrayView< Real, Device, Index >::operator=(data);
   }
#endif

   /**
    * \brief Adds elements of this vector view and a vector expression and