Loading build +1 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,7 @@ fi if [[ ${WITH_CLANG} == "yes" ]]; then export CXX=clang++ export CC=clang export CUDA_HOST_COMPILER=clang++ else export CXX=g++ export CC=gcc Loading src/TNL/Containers/DistributedVectorView.h +2 −2 Original line number Diff line number Diff line Loading @@ -53,8 +53,8 @@ public: // initialization by base class is not a copy constructor so it has to be explicit template< typename Real_ > // template catches both const and non-const qualified Element __cuda_callable__ DistributedVectorView( const DistributedArrayView< Real_, Device, Index, Communicator >& view ) : BaseType::DistributedArrayView( view ) {} DistributedVectorView( const Containers::DistributedArrayView< Real_, Device, Index, Communicator >& view ) : BaseType( view ) {} LocalVectorViewType getLocalVectorView(); Loading src/TNL/Containers/Vector.h +15 −3 Original line number Diff line number Diff line Loading @@ -150,11 +150,23 @@ public: */ template< typename VectorExpression, typename..., typename = std::enable_if_t< Expressions::IsExpressionTemplate< VectorExpression >::value >, // workaround for nvcc 10.1: adding one more template parameter fixes a problem with inheriting operator= from the base class typename = void > typename = std::enable_if_t< Expressions::IsExpressionTemplate< VectorExpression >::value > > Vector& operator=( const VectorExpression& expression ); /** * \brief Assigns a value or an array - same as \ref Array::operator=. */ // 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 template< typename T, typename..., typename = std::enable_if_t< std::is_convertible< T, Real >::value || IsArrayType< T >::value > > Array< Real, Device, Index, Allocator >& operator=( const T& data ) { return Array< Real, Device, Index, Allocator >::operator=(data); } /** * \brief This function subtracts \e vector from this vector and returns the resulting vector. * Loading src/TNL/Containers/Vector.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -141,7 +141,7 @@ template< typename Real, typename Device, typename Index, typename Allocator > template< typename VectorExpression, typename..., typename, typename > template< typename VectorExpression, typename..., typename > Vector< Real, Device, Index, Allocator >& Vector< Real, Device, Index, Allocator >:: operator=( const VectorExpression& expression ) Loading src/TNL/Containers/VectorView.h +16 −4 Original line number Diff line number Diff line Loading @@ -50,7 +50,7 @@ public: template< typename Real_ > // template catches both const and non-const qualified Element __cuda_callable__ VectorView( const ArrayView< Real_, Device, Index >& view ) : BaseType::ArrayView( view ) {} : BaseType( view ) {} /** * \brief Returns a modifiable view of the vector view. Loading Loading @@ -109,11 +109,23 @@ public: template< typename VectorExpression, typename..., typename = std::enable_if_t< Expressions::IsExpressionTemplate< VectorExpression >::value >, // workaround for nvcc 10.1: adding one more template parameter fixes a problem with inheriting operator= from the base class typename = void > typename = std::enable_if_t< Expressions::IsExpressionTemplate< VectorExpression >::value > > VectorView& operator=( const VectorExpression& expression ); /** * \brief Assigns a value or an array - same as \ref ArrayView::operator=. */ // 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 template< typename T, typename..., typename = std::enable_if_t< std::is_convertible< T, Real >::value || IsArrayType< T >::value > > ArrayView< Real, Device, Index >& operator=( const T& data ) { return ArrayView< Real, Device, Index >::operator=(data); } template< typename VectorExpression > VectorView& operator-=( const VectorExpression& expression ); Loading Loading
build +1 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,7 @@ fi if [[ ${WITH_CLANG} == "yes" ]]; then export CXX=clang++ export CC=clang export CUDA_HOST_COMPILER=clang++ else export CXX=g++ export CC=gcc Loading
src/TNL/Containers/DistributedVectorView.h +2 −2 Original line number Diff line number Diff line Loading @@ -53,8 +53,8 @@ public: // initialization by base class is not a copy constructor so it has to be explicit template< typename Real_ > // template catches both const and non-const qualified Element __cuda_callable__ DistributedVectorView( const DistributedArrayView< Real_, Device, Index, Communicator >& view ) : BaseType::DistributedArrayView( view ) {} DistributedVectorView( const Containers::DistributedArrayView< Real_, Device, Index, Communicator >& view ) : BaseType( view ) {} LocalVectorViewType getLocalVectorView(); Loading
src/TNL/Containers/Vector.h +15 −3 Original line number Diff line number Diff line Loading @@ -150,11 +150,23 @@ public: */ template< typename VectorExpression, typename..., typename = std::enable_if_t< Expressions::IsExpressionTemplate< VectorExpression >::value >, // workaround for nvcc 10.1: adding one more template parameter fixes a problem with inheriting operator= from the base class typename = void > typename = std::enable_if_t< Expressions::IsExpressionTemplate< VectorExpression >::value > > Vector& operator=( const VectorExpression& expression ); /** * \brief Assigns a value or an array - same as \ref Array::operator=. */ // 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 template< typename T, typename..., typename = std::enable_if_t< std::is_convertible< T, Real >::value || IsArrayType< T >::value > > Array< Real, Device, Index, Allocator >& operator=( const T& data ) { return Array< Real, Device, Index, Allocator >::operator=(data); } /** * \brief This function subtracts \e vector from this vector and returns the resulting vector. * Loading
src/TNL/Containers/Vector.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -141,7 +141,7 @@ template< typename Real, typename Device, typename Index, typename Allocator > template< typename VectorExpression, typename..., typename, typename > template< typename VectorExpression, typename..., typename > Vector< Real, Device, Index, Allocator >& Vector< Real, Device, Index, Allocator >:: operator=( const VectorExpression& expression ) Loading
src/TNL/Containers/VectorView.h +16 −4 Original line number Diff line number Diff line Loading @@ -50,7 +50,7 @@ public: template< typename Real_ > // template catches both const and non-const qualified Element __cuda_callable__ VectorView( const ArrayView< Real_, Device, Index >& view ) : BaseType::ArrayView( view ) {} : BaseType( view ) {} /** * \brief Returns a modifiable view of the vector view. Loading Loading @@ -109,11 +109,23 @@ public: template< typename VectorExpression, typename..., typename = std::enable_if_t< Expressions::IsExpressionTemplate< VectorExpression >::value >, // workaround for nvcc 10.1: adding one more template parameter fixes a problem with inheriting operator= from the base class typename = void > typename = std::enable_if_t< Expressions::IsExpressionTemplate< VectorExpression >::value > > VectorView& operator=( const VectorExpression& expression ); /** * \brief Assigns a value or an array - same as \ref ArrayView::operator=. */ // 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 template< typename T, typename..., typename = std::enable_if_t< std::is_convertible< T, Real >::value || IsArrayType< T >::value > > ArrayView< Real, Device, Index >& operator=( const T& data ) { return ArrayView< Real, Device, Index >::operator=(data); } template< typename VectorExpression > VectorView& operator-=( const VectorExpression& expression ); Loading