Loading src/TNL/Containers/ArrayView.hpp +2 −2 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ getView( const IndexType begin, IndexType end ) { if( end == -1 ) end = this->getSize(); return *this; return ViewType( &getData()[ begin ], end - begin );; } template< typename Value, Loading @@ -107,7 +107,7 @@ getConstView( const IndexType begin, IndexType end ) const { if( end == -1 ) end = this->getSize(); return *this; return ConstViewType( &getData()[ begin ], end - begin ); } // Copy-assignment does deep copy, just like regular array, but the sizes Loading src/TNL/Containers/VectorView.h +4 −4 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ public: // (works fine in nvcc 9.0) using ArrayView< Real, Device, Index >::ArrayView; #endif using ArrayView< Real, Device, Index >::getData; /** Subscript operator is inherited from the class \ref Array. */ using ArrayView< Real, Device, Index >::operator[]; Loading Loading @@ -71,18 +72,17 @@ public: __cuda_callable__ VectorView( const Expressions::UnaryExpressionTemplate< T, Operation >& expression ); /** * \brief Returns a modifiable view of the array view. */ __cuda_callable__ ViewType getView(); ViewType getView( const IndexType begin = 0, IndexType end = -1 ); /** * \brief Returns a non-modifiable view of the array view. */ __cuda_callable__ ConstViewType getConstView() const; ConstViewType getConstView( const IndexType begin = 0, IndexType end = -1 ) const; static String getType(); Loading src/TNL/Containers/VectorView_impl.h +8 −4 Original line number Diff line number Diff line Loading @@ -45,9 +45,11 @@ template< typename Real, typename Index > typename VectorView< Real, Device, Index >::ViewType VectorView< Real, Device, Index >:: getView() getView( const IndexType begin, IndexType end ) { return *this; if( end == -1 ) end = this->getSize(); return ViewType( &getData()[ begin ], end - begin );; } template< typename Real, Loading @@ -55,9 +57,11 @@ template< typename Real, typename Index > typename VectorView< Real, Device, Index >::ConstViewType VectorView< Real, Device, Index >:: getConstView() const getConstView( const IndexType begin, IndexType end ) const { return *this; if( end == -1 ) end = this->getSize(); return ConstViewType( &getData()[ begin ], end - begin );; } template< typename Real, Loading Loading
src/TNL/Containers/ArrayView.hpp +2 −2 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ getView( const IndexType begin, IndexType end ) { if( end == -1 ) end = this->getSize(); return *this; return ViewType( &getData()[ begin ], end - begin );; } template< typename Value, Loading @@ -107,7 +107,7 @@ getConstView( const IndexType begin, IndexType end ) const { if( end == -1 ) end = this->getSize(); return *this; return ConstViewType( &getData()[ begin ], end - begin ); } // Copy-assignment does deep copy, just like regular array, but the sizes Loading
src/TNL/Containers/VectorView.h +4 −4 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ public: // (works fine in nvcc 9.0) using ArrayView< Real, Device, Index >::ArrayView; #endif using ArrayView< Real, Device, Index >::getData; /** Subscript operator is inherited from the class \ref Array. */ using ArrayView< Real, Device, Index >::operator[]; Loading Loading @@ -71,18 +72,17 @@ public: __cuda_callable__ VectorView( const Expressions::UnaryExpressionTemplate< T, Operation >& expression ); /** * \brief Returns a modifiable view of the array view. */ __cuda_callable__ ViewType getView(); ViewType getView( const IndexType begin = 0, IndexType end = -1 ); /** * \brief Returns a non-modifiable view of the array view. */ __cuda_callable__ ConstViewType getConstView() const; ConstViewType getConstView( const IndexType begin = 0, IndexType end = -1 ) const; static String getType(); Loading
src/TNL/Containers/VectorView_impl.h +8 −4 Original line number Diff line number Diff line Loading @@ -45,9 +45,11 @@ template< typename Real, typename Index > typename VectorView< Real, Device, Index >::ViewType VectorView< Real, Device, Index >:: getView() getView( const IndexType begin, IndexType end ) { return *this; if( end == -1 ) end = this->getSize(); return ViewType( &getData()[ begin ], end - begin );; } template< typename Real, Loading @@ -55,9 +57,11 @@ template< typename Real, typename Index > typename VectorView< Real, Device, Index >::ConstViewType VectorView< Real, Device, Index >:: getConstView() const getConstView( const IndexType begin, IndexType end ) const { return *this; if( end == -1 ) end = this->getSize(); return ConstViewType( &getData()[ begin ], end - begin );; } template< typename Real, Loading