Loading src/TNL/Containers/Array.hpp +12 −0 Original line number Diff line number Diff line Loading @@ -258,6 +258,12 @@ template< typename Value, typename Device, typename Index, typename Allocator > typename Array< Value, Device, Index, Allocator >::ViewType Array< Value, Device, Index, Allocator >::getView( IndexType begin, IndexType end ) { TNL_ASSERT_GE( begin, ( Index ) 0, "Parameter 'begin' must be non-negative." ); TNL_ASSERT_LE( begin, getSize(), "Parameter 'begin' must be lower or equal to size of the array." ); TNL_ASSERT_GE( end, ( Index ) 0, "Parameter 'end' must be non-negative." ); TNL_ASSERT_LE( end, getSize(), "Parameter 'end' must be lower or equal to size of the array." ); TNL_ASSERT_LE( begin, end, "Parameter 'begin' must be lower or equal to the parameter 'end'." ); if( end == 0 ) end = getSize(); return ViewType( getData() + begin, end - begin ); Loading @@ -267,6 +273,12 @@ template< typename Value, typename Device, typename Index, typename Allocator > typename Array< Value, Device, Index, Allocator >::ConstViewType Array< Value, Device, Index, Allocator >::getConstView( IndexType begin, IndexType end ) const { TNL_ASSERT_GE( begin, ( Index ) 0, "Parameter 'begin' must be non-negative." ); TNL_ASSERT_LE( begin, getSize(), "Parameter 'begin' must be lower or equal to size of the array." ); TNL_ASSERT_GE( end, ( Index ) 0, "Parameter 'end' must be non-negative." ); TNL_ASSERT_LE( end, getSize(), "Parameter 'end' must be lower or equal to size of the array." ); TNL_ASSERT_LE( begin, end, "Parameter 'begin' must be lower or equal to the parameter 'end'." ); if( end == 0 ) end = getSize(); return ConstViewType( getData() + begin, end - begin ); Loading src/TNL/Containers/ArrayView.hpp +12 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,12 @@ __cuda_callable__ typename ArrayView< Value, Device, Index >::ViewType ArrayView< Value, Device, Index >::getView( IndexType begin, IndexType end ) { TNL_ASSERT_GE( begin, ( Index ) 0, "Parameter 'begin' must be non-negative." ); TNL_ASSERT_LE( begin, getSize(), "Parameter 'begin' must be lower or equal to size of the array view." ); TNL_ASSERT_GE( end, ( Index ) 0, "Parameter 'end' must be non-negative." ); TNL_ASSERT_LE( end, getSize(), "Parameter 'end' must be lower or equal to size of the array view." ); TNL_ASSERT_LE( begin, end, "Parameter 'begin' must be lower or equal to the parameter 'end'." ); if( end == 0 ) end = this->getSize(); return ViewType( getData() + begin, end - begin ); Loading @@ -70,6 +76,12 @@ __cuda_callable__ typename ArrayView< Value, Device, Index >::ConstViewType ArrayView< Value, Device, Index >::getConstView( IndexType begin, IndexType end ) const { TNL_ASSERT_GE( begin, ( Index ) 0, "Parameter 'begin' must be non-negative." ); TNL_ASSERT_LE( begin, getSize(), "Parameter 'begin' must be lower or equal to size of the array view." ); TNL_ASSERT_GE( end, ( Index ) 0, "Parameter 'end' must be non-negative." ); TNL_ASSERT_LE( end, getSize(), "Parameter 'end' must be lower or equal to size of the array view." ); TNL_ASSERT_LE( begin, end, "Parameter 'begin' must be lower or equal to the parameter 'end'." ); if( end == 0 ) end = this->getSize(); return ConstViewType( getData() + begin, end - begin ); Loading src/TNL/Containers/Vector.hpp +12 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,12 @@ template< typename Real, typename Device, typename Index, typename Allocator > typename Vector< Real, Device, Index, Allocator >::ViewType Vector< Real, Device, Index, Allocator >::getView( IndexType begin, IndexType end ) { TNL_ASSERT_GE( begin, ( Index ) 0, "Parameter 'begin' must be non-negative." ); TNL_ASSERT_LE( begin, this->getSize(), "Parameter 'begin' must be lower or equal to size of the vector." ); TNL_ASSERT_GE( end, ( Index ) 0, "Parameter 'end' must be non-negative." ); TNL_ASSERT_LE( end, this->getSize(), "Parameter 'end' must be lower or equal to size of the vector." ); TNL_ASSERT_LE( begin, end, "Parameter 'begin' must be lower or equal to the parameter 'end'." ); if( end == 0 ) end = this->getSize(); return ViewType( this->getData() + begin, end - begin ); Loading @@ -37,6 +43,12 @@ template< typename Real, typename Device, typename Index, typename Allocator > typename Vector< Real, Device, Index, Allocator >::ConstViewType Vector< Real, Device, Index, Allocator >::getConstView( IndexType begin, IndexType end ) const { TNL_ASSERT_GE( begin, ( Index ) 0, "Parameter 'begin' must be non-negative." ); TNL_ASSERT_LE( begin, this->getSize(), "Parameter 'begin' must be lower or equal to size of the vector." ); TNL_ASSERT_GE( end, ( Index ) 0, "Parameter 'end' must be non-negative." ); TNL_ASSERT_LE( end, this->getSize(), "Parameter 'end' must be lower or equal to size of the vector." ); TNL_ASSERT_LE( begin, end, "Parameter 'begin' must be lower or equal to the parameter 'end'." ); if( end == 0 ) end = this->getSize(); return ConstViewType( this->getData() + begin, end - begin ); Loading src/TNL/Containers/VectorView.hpp +12 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,12 @@ __cuda_callable__ typename VectorView< Real, Device, Index >::ViewType VectorView< Real, Device, Index >::getView( IndexType begin, IndexType end ) { TNL_ASSERT_GE( begin, ( Index ) 0, "Parameter 'begin' must be non-negative." ); TNL_ASSERT_LE( begin, this->getSize(), "Parameter 'begin' must be lower or equal to size of the vector view." ); TNL_ASSERT_GE( end, ( Index ) 0, "Parameter 'end' must be non-negative." ); TNL_ASSERT_LE( end, this->getSize(), "Parameter 'end' must be lower or equal to size of the vector view." ); TNL_ASSERT_LE( begin, end, "Parameter 'begin' must be lower or equal to the parameter 'end'." ); if( end == 0 ) end = this->getSize(); return ViewType( this->getData() + begin, end - begin ); Loading @@ -28,6 +34,12 @@ __cuda_callable__ typename VectorView< Real, Device, Index >::ConstViewType VectorView< Real, Device, Index >::getConstView( const IndexType begin, IndexType end ) const { TNL_ASSERT_GE( begin, ( Index ) 0, "Parameter 'begin' must be non-negative." ); TNL_ASSERT_LE( begin, this->getSize(), "Parameter 'begin' must be lower or equal to size of the vector view." ); TNL_ASSERT_GE( end, ( Index ) 0, "Parameter 'end' must be non-negative." ); TNL_ASSERT_LE( end, this->getSize(), "Parameter 'end' must be lower or equal to size of the vector view." ); TNL_ASSERT_LE( begin, end, "Parameter 'begin' must be lower or equal to the parameter 'end'." ); if( end == 0 ) end = this->getSize(); return ConstViewType( this->getData() + begin, end - begin ); Loading Loading
src/TNL/Containers/Array.hpp +12 −0 Original line number Diff line number Diff line Loading @@ -258,6 +258,12 @@ template< typename Value, typename Device, typename Index, typename Allocator > typename Array< Value, Device, Index, Allocator >::ViewType Array< Value, Device, Index, Allocator >::getView( IndexType begin, IndexType end ) { TNL_ASSERT_GE( begin, ( Index ) 0, "Parameter 'begin' must be non-negative." ); TNL_ASSERT_LE( begin, getSize(), "Parameter 'begin' must be lower or equal to size of the array." ); TNL_ASSERT_GE( end, ( Index ) 0, "Parameter 'end' must be non-negative." ); TNL_ASSERT_LE( end, getSize(), "Parameter 'end' must be lower or equal to size of the array." ); TNL_ASSERT_LE( begin, end, "Parameter 'begin' must be lower or equal to the parameter 'end'." ); if( end == 0 ) end = getSize(); return ViewType( getData() + begin, end - begin ); Loading @@ -267,6 +273,12 @@ template< typename Value, typename Device, typename Index, typename Allocator > typename Array< Value, Device, Index, Allocator >::ConstViewType Array< Value, Device, Index, Allocator >::getConstView( IndexType begin, IndexType end ) const { TNL_ASSERT_GE( begin, ( Index ) 0, "Parameter 'begin' must be non-negative." ); TNL_ASSERT_LE( begin, getSize(), "Parameter 'begin' must be lower or equal to size of the array." ); TNL_ASSERT_GE( end, ( Index ) 0, "Parameter 'end' must be non-negative." ); TNL_ASSERT_LE( end, getSize(), "Parameter 'end' must be lower or equal to size of the array." ); TNL_ASSERT_LE( begin, end, "Parameter 'begin' must be lower or equal to the parameter 'end'." ); if( end == 0 ) end = getSize(); return ConstViewType( getData() + begin, end - begin ); Loading
src/TNL/Containers/ArrayView.hpp +12 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,12 @@ __cuda_callable__ typename ArrayView< Value, Device, Index >::ViewType ArrayView< Value, Device, Index >::getView( IndexType begin, IndexType end ) { TNL_ASSERT_GE( begin, ( Index ) 0, "Parameter 'begin' must be non-negative." ); TNL_ASSERT_LE( begin, getSize(), "Parameter 'begin' must be lower or equal to size of the array view." ); TNL_ASSERT_GE( end, ( Index ) 0, "Parameter 'end' must be non-negative." ); TNL_ASSERT_LE( end, getSize(), "Parameter 'end' must be lower or equal to size of the array view." ); TNL_ASSERT_LE( begin, end, "Parameter 'begin' must be lower or equal to the parameter 'end'." ); if( end == 0 ) end = this->getSize(); return ViewType( getData() + begin, end - begin ); Loading @@ -70,6 +76,12 @@ __cuda_callable__ typename ArrayView< Value, Device, Index >::ConstViewType ArrayView< Value, Device, Index >::getConstView( IndexType begin, IndexType end ) const { TNL_ASSERT_GE( begin, ( Index ) 0, "Parameter 'begin' must be non-negative." ); TNL_ASSERT_LE( begin, getSize(), "Parameter 'begin' must be lower or equal to size of the array view." ); TNL_ASSERT_GE( end, ( Index ) 0, "Parameter 'end' must be non-negative." ); TNL_ASSERT_LE( end, getSize(), "Parameter 'end' must be lower or equal to size of the array view." ); TNL_ASSERT_LE( begin, end, "Parameter 'begin' must be lower or equal to the parameter 'end'." ); if( end == 0 ) end = this->getSize(); return ConstViewType( getData() + begin, end - begin ); Loading
src/TNL/Containers/Vector.hpp +12 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,12 @@ template< typename Real, typename Device, typename Index, typename Allocator > typename Vector< Real, Device, Index, Allocator >::ViewType Vector< Real, Device, Index, Allocator >::getView( IndexType begin, IndexType end ) { TNL_ASSERT_GE( begin, ( Index ) 0, "Parameter 'begin' must be non-negative." ); TNL_ASSERT_LE( begin, this->getSize(), "Parameter 'begin' must be lower or equal to size of the vector." ); TNL_ASSERT_GE( end, ( Index ) 0, "Parameter 'end' must be non-negative." ); TNL_ASSERT_LE( end, this->getSize(), "Parameter 'end' must be lower or equal to size of the vector." ); TNL_ASSERT_LE( begin, end, "Parameter 'begin' must be lower or equal to the parameter 'end'." ); if( end == 0 ) end = this->getSize(); return ViewType( this->getData() + begin, end - begin ); Loading @@ -37,6 +43,12 @@ template< typename Real, typename Device, typename Index, typename Allocator > typename Vector< Real, Device, Index, Allocator >::ConstViewType Vector< Real, Device, Index, Allocator >::getConstView( IndexType begin, IndexType end ) const { TNL_ASSERT_GE( begin, ( Index ) 0, "Parameter 'begin' must be non-negative." ); TNL_ASSERT_LE( begin, this->getSize(), "Parameter 'begin' must be lower or equal to size of the vector." ); TNL_ASSERT_GE( end, ( Index ) 0, "Parameter 'end' must be non-negative." ); TNL_ASSERT_LE( end, this->getSize(), "Parameter 'end' must be lower or equal to size of the vector." ); TNL_ASSERT_LE( begin, end, "Parameter 'begin' must be lower or equal to the parameter 'end'." ); if( end == 0 ) end = this->getSize(); return ConstViewType( this->getData() + begin, end - begin ); Loading
src/TNL/Containers/VectorView.hpp +12 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,12 @@ __cuda_callable__ typename VectorView< Real, Device, Index >::ViewType VectorView< Real, Device, Index >::getView( IndexType begin, IndexType end ) { TNL_ASSERT_GE( begin, ( Index ) 0, "Parameter 'begin' must be non-negative." ); TNL_ASSERT_LE( begin, this->getSize(), "Parameter 'begin' must be lower or equal to size of the vector view." ); TNL_ASSERT_GE( end, ( Index ) 0, "Parameter 'end' must be non-negative." ); TNL_ASSERT_LE( end, this->getSize(), "Parameter 'end' must be lower or equal to size of the vector view." ); TNL_ASSERT_LE( begin, end, "Parameter 'begin' must be lower or equal to the parameter 'end'." ); if( end == 0 ) end = this->getSize(); return ViewType( this->getData() + begin, end - begin ); Loading @@ -28,6 +34,12 @@ __cuda_callable__ typename VectorView< Real, Device, Index >::ConstViewType VectorView< Real, Device, Index >::getConstView( const IndexType begin, IndexType end ) const { TNL_ASSERT_GE( begin, ( Index ) 0, "Parameter 'begin' must be non-negative." ); TNL_ASSERT_LE( begin, this->getSize(), "Parameter 'begin' must be lower or equal to size of the vector view." ); TNL_ASSERT_GE( end, ( Index ) 0, "Parameter 'end' must be non-negative." ); TNL_ASSERT_LE( end, this->getSize(), "Parameter 'end' must be lower or equal to size of the vector view." ); TNL_ASSERT_LE( begin, end, "Parameter 'begin' must be lower or equal to the parameter 'end'." ); if( end == 0 ) end = this->getSize(); return ConstViewType( this->getData() + begin, end - begin ); Loading