Loading src/TNL/Containers/Array.h +2 −2 Original line number Diff line number Diff line Loading @@ -433,7 +433,7 @@ class Array * \param i The index of the element to be accessed. * \return Reference to the \e i-th element. */ __cuda_callable__ inline Value& operator[]( const Index& i ); __cuda_callable__ Value& operator[]( const Index& i ); /** * \brief Accesses the \e i-th element of the array. Loading @@ -447,7 +447,7 @@ class Array * \param i The index of the element to be accessed. * \return Constant reference to the \e i-th element. */ __cuda_callable__ inline const Value& operator[]( const Index& i ) const; __cuda_callable__ const Value& operator[]( const Index& i ) const; /** * \brief Copy-assignment operator for copying data from another array. Loading src/TNL/Containers/Array.hpp +2 −2 Original line number Diff line number Diff line Loading @@ -515,7 +515,7 @@ template< typename Value, typename Index, typename Allocator > __cuda_callable__ inline Value& Value& Array< Value, Device, Index, Allocator >:: operator[]( const Index& i ) { Loading @@ -529,7 +529,7 @@ template< typename Value, typename Index, typename Allocator > __cuda_callable__ inline const Value& const Value& Array< Value, Device, Index, Allocator >:: operator[]( const Index& i ) const { Loading src/TNL/Containers/StaticArray.h +21 −21 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ public: //! \brief Default constructor. __cuda_callable__ inline StaticArray(); StaticArray(); /** * \brief Constructor that sets all array components (with the number of \e Size) to value \e v. Loading @@ -57,7 +57,7 @@ public: * \param v Reference to a value. */ __cuda_callable__ inline StaticArray( const Value& v ); StaticArray( const Value& v ); /** * \brief Copy constructor. Loading @@ -65,9 +65,9 @@ public: * Constructs a copy of another static array \e v. */ __cuda_callable__ inline StaticArray( const StaticArray< Size, Value >& v ); StaticArray( const StaticArray< Size, Value >& v ); inline StaticArray( const std::initializer_list< Value > &elems ); StaticArray( const std::initializer_list< Value > &elems ); /** * \brief Constructor that sets components of arrays with Size = 2. Loading @@ -76,7 +76,7 @@ public: * \param v2 Value of the second array component. */ __cuda_callable__ inline StaticArray( const Value& v1, const Value& v2 ); StaticArray( const Value& v1, const Value& v2 ); /** * \brief Constructor that sets components of arrays with Size = 3. Loading @@ -86,7 +86,7 @@ public: * \param v3 Value of the third array component. */ __cuda_callable__ inline StaticArray( const Value& v1, const Value& v2, const Value& v3 ); StaticArray( const Value& v1, const Value& v2, const Value& v3 ); /** * \brief Gets type of this array. Loading @@ -98,13 +98,13 @@ public: * \brief Gets all data of this static array. */ __cuda_callable__ inline Value* getData(); Value* getData(); /** * \brief Gets all data of this static array. */ __cuda_callable__ inline const Value* getData() const; const Value* getData() const; /** * \brief Accesses specified element at the position \e i and returns a reference to its value. Loading @@ -112,7 +112,7 @@ public: * \param i Index position of an element. */ __cuda_callable__ inline const Value& operator[]( int i ) const; const Value& operator[]( int i ) const; /** * \brief Accesses specified element at the position \e i and returns a reference to its value. Loading @@ -120,44 +120,44 @@ public: * \param i Index position of an element. */ __cuda_callable__ inline Value& operator[]( int i ); Value& operator[]( int i ); /** \brief Returns the first coordinate.*/ __cuda_callable__ inline Value& x(); Value& x(); /** \brief Returns the first coordinate.*/ __cuda_callable__ inline const Value& x() const; const Value& x() const; /** \brief Returns the second coordinate for arrays with Size >= 2.*/ __cuda_callable__ inline Value& y(); Value& y(); /** \brief Returns the second coordinate for arrays with Size >= 2.*/ __cuda_callable__ inline const Value& y() const; const Value& y() const; /** \brief Returns the third coordinate for arrays with Size >= 3..*/ __cuda_callable__ inline Value& z(); Value& z(); /** \brief Returns the third coordinate for arrays with Size >= 3..*/ __cuda_callable__ inline const Value& z() const; const Value& z() const; /** * \brief Assigns another static \e array to this array, replacing its current contents. */ __cuda_callable__ inline StaticArray< Size, Value >& operator=( const StaticArray< Size, Value >& array ); StaticArray< Size, Value >& operator=( const StaticArray< Size, Value >& array ); /** * \brief Assigns another static \e array to this array, replacing its current contents. */ template< typename Array > __cuda_callable__ inline StaticArray< Size, Value >& operator=( const Array& array ); StaticArray< Size, Value >& operator=( const Array& array ); /** * \brief This function checks whether this static array is equal to another \e array. Loading @@ -166,7 +166,7 @@ public: */ template< typename Array > __cuda_callable__ inline bool operator==( const Array& array ) const; bool operator==( const Array& array ) const; /** * \brief This function checks whether this static array is not equal to another \e array. Loading @@ -175,7 +175,7 @@ public: */ template< typename Array > __cuda_callable__ inline bool operator!=( const Array& array ) const; bool operator!=( const Array& array ) const; template< typename OtherValue > __cuda_callable__ Loading @@ -185,7 +185,7 @@ public: * \brief Sets all values of this static array to \e val. */ __cuda_callable__ inline void setValue( const ValueType& val ); void setValue( const ValueType& val ); /** * \brief Saves this static array into the \e file. Loading src/TNL/Containers/StaticArray.hpp +17 −17 Original line number Diff line number Diff line Loading @@ -116,14 +116,14 @@ StaticArray< Size, Value >::StaticArray( const Value v[ Size ] ) template< int Size, typename Value > __cuda_callable__ inline StaticArray< Size, Value >::StaticArray( const Value& v ) StaticArray< Size, Value >::StaticArray( const Value& v ) { StaticFor< 0, Size >::exec( detail::assignValueLambda< Value >, data, v ); } template< int Size, typename Value > __cuda_callable__ inline StaticArray< Size, Value >::StaticArray( const StaticArray< Size, Value >& v ) StaticArray< Size, Value >::StaticArray( const StaticArray< Size, Value >& v ) { StaticFor< 0, Size >::exec( detail::assignArrayLambda< Value >, data, v.getData() ); } Loading Loading @@ -167,21 +167,21 @@ String StaticArray< Size, Value >::getType() template< int Size, typename Value > __cuda_callable__ inline Value* StaticArray< Size, Value >::getData() Value* StaticArray< Size, Value >::getData() { return data; } template< int Size, typename Value > __cuda_callable__ inline const Value* StaticArray< Size, Value >::getData() const const Value* StaticArray< Size, Value >::getData() const { return data; } template< int Size, typename Value > __cuda_callable__ inline const Value& StaticArray< Size, Value >::operator[]( int i ) const const Value& StaticArray< Size, Value >::operator[]( int i ) const { TNL_ASSERT_GE( i, 0, "Element index must be non-negative." ); TNL_ASSERT_LT( i, Size, "Element index is out of bounds." ); Loading @@ -190,7 +190,7 @@ inline const Value& StaticArray< Size, Value >::operator[]( int i ) const template< int Size, typename Value > __cuda_callable__ inline Value& StaticArray< Size, Value >::operator[]( int i ) Value& StaticArray< Size, Value >::operator[]( int i ) { TNL_ASSERT_GE( i, 0, "Element index must be non-negative." ); TNL_ASSERT_LT( i, Size, "Element index is out of bounds." ); Loading @@ -198,21 +198,21 @@ inline Value& StaticArray< Size, Value >::operator[]( int i ) } template< int Size, typename Value > __cuda_callable__ inline Value& StaticArray< Size, Value >::x() Value& StaticArray< Size, Value >::x() { return data[ 0 ]; } template< int Size, typename Value > __cuda_callable__ inline const Value& StaticArray< Size, Value >::x() const const Value& StaticArray< Size, Value >::x() const { return data[ 0 ]; } template< int Size, typename Value > __cuda_callable__ inline Value& StaticArray< Size, Value >::y() Value& StaticArray< Size, Value >::y() { static_assert( Size > 1, "Cannot call StaticArray< Size, Value >::y() for arrays with Size < 2." ); return data[ 1 ]; Loading @@ -220,7 +220,7 @@ inline Value& StaticArray< Size, Value >::y() template< int Size, typename Value > __cuda_callable__ inline const Value& StaticArray< Size, Value >::y() const const Value& StaticArray< Size, Value >::y() const { static_assert( Size > 1, "Cannot call StaticArray< Size, Value >::y() for arrays with Size < 2." ); return data[ 1 ]; Loading @@ -228,7 +228,7 @@ inline const Value& StaticArray< Size, Value >::y() const template< int Size, typename Value > __cuda_callable__ inline Value& StaticArray< Size, Value >::z() Value& StaticArray< Size, Value >::z() { static_assert( Size > 1, "Cannot call StaticArray< Size, Value >::z() for arrays with Size < 3." ); return data[ 2 ]; Loading @@ -236,7 +236,7 @@ inline Value& StaticArray< Size, Value >::z() template< int Size, typename Value > __cuda_callable__ inline const Value& StaticArray< Size, Value >::z() const const Value& StaticArray< Size, Value >::z() const { static_assert( Size > 1, "Cannot call StaticArray< Size, Value >::z() for arrays with Size < 3." ); return data[ 2 ]; Loading @@ -244,7 +244,7 @@ inline const Value& StaticArray< Size, Value >::z() const template< int Size, typename Value > __cuda_callable__ inline StaticArray< Size, Value >& StaticArray< Size, Value >::operator=( const StaticArray< Size, Value >& array ) StaticArray< Size, Value >& StaticArray< Size, Value >::operator=( const StaticArray< Size, Value >& array ) { StaticFor< 0, Size >::exec( detail::assignArrayLambda< Value >, data, array.getData() ); return *this; Loading @@ -253,7 +253,7 @@ inline StaticArray< Size, Value >& StaticArray< Size, Value >::operator=( const template< int Size, typename Value > template< typename Array > __cuda_callable__ inline StaticArray< Size, Value >& StaticArray< Size, Value >::operator=( const Array& array ) StaticArray< Size, Value >& StaticArray< Size, Value >::operator=( const Array& array ) { StaticFor< 0, Size >::exec( detail::assignArrayLambda< Value, typename Array::ValueType >, data, array.getData() ); return *this; Loading @@ -262,7 +262,7 @@ inline StaticArray< Size, Value >& StaticArray< Size, Value >::operator=( const template< int Size, typename Value > template< typename Array > __cuda_callable__ inline bool StaticArray< Size, Value >::operator==( const Array& array ) const bool StaticArray< Size, Value >::operator==( const Array& array ) const { return detail::StaticArrayComparator< Size, Value, typename Array::ValueType, 0 >::EQ( *this, array ); } Loading @@ -270,7 +270,7 @@ inline bool StaticArray< Size, Value >::operator==( const Array& array ) const template< int Size, typename Value > template< typename Array > __cuda_callable__ inline bool StaticArray< Size, Value >::operator!=( const Array& array ) const bool StaticArray< Size, Value >::operator!=( const Array& array ) const { return ! this->operator==( array ); } Loading @@ -288,7 +288,7 @@ operator StaticArray< Size, OtherValue >() const template< int Size, typename Value > __cuda_callable__ inline void StaticArray< Size, Value >::setValue( const ValueType& val ) void StaticArray< Size, Value >::setValue( const ValueType& val ) { StaticFor< 0, Size >::exec( detail::assignValueLambda< Value >, data, val ); } Loading Loading
src/TNL/Containers/Array.h +2 −2 Original line number Diff line number Diff line Loading @@ -433,7 +433,7 @@ class Array * \param i The index of the element to be accessed. * \return Reference to the \e i-th element. */ __cuda_callable__ inline Value& operator[]( const Index& i ); __cuda_callable__ Value& operator[]( const Index& i ); /** * \brief Accesses the \e i-th element of the array. Loading @@ -447,7 +447,7 @@ class Array * \param i The index of the element to be accessed. * \return Constant reference to the \e i-th element. */ __cuda_callable__ inline const Value& operator[]( const Index& i ) const; __cuda_callable__ const Value& operator[]( const Index& i ) const; /** * \brief Copy-assignment operator for copying data from another array. Loading
src/TNL/Containers/Array.hpp +2 −2 Original line number Diff line number Diff line Loading @@ -515,7 +515,7 @@ template< typename Value, typename Index, typename Allocator > __cuda_callable__ inline Value& Value& Array< Value, Device, Index, Allocator >:: operator[]( const Index& i ) { Loading @@ -529,7 +529,7 @@ template< typename Value, typename Index, typename Allocator > __cuda_callable__ inline const Value& const Value& Array< Value, Device, Index, Allocator >:: operator[]( const Index& i ) const { Loading
src/TNL/Containers/StaticArray.h +21 −21 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ public: //! \brief Default constructor. __cuda_callable__ inline StaticArray(); StaticArray(); /** * \brief Constructor that sets all array components (with the number of \e Size) to value \e v. Loading @@ -57,7 +57,7 @@ public: * \param v Reference to a value. */ __cuda_callable__ inline StaticArray( const Value& v ); StaticArray( const Value& v ); /** * \brief Copy constructor. Loading @@ -65,9 +65,9 @@ public: * Constructs a copy of another static array \e v. */ __cuda_callable__ inline StaticArray( const StaticArray< Size, Value >& v ); StaticArray( const StaticArray< Size, Value >& v ); inline StaticArray( const std::initializer_list< Value > &elems ); StaticArray( const std::initializer_list< Value > &elems ); /** * \brief Constructor that sets components of arrays with Size = 2. Loading @@ -76,7 +76,7 @@ public: * \param v2 Value of the second array component. */ __cuda_callable__ inline StaticArray( const Value& v1, const Value& v2 ); StaticArray( const Value& v1, const Value& v2 ); /** * \brief Constructor that sets components of arrays with Size = 3. Loading @@ -86,7 +86,7 @@ public: * \param v3 Value of the third array component. */ __cuda_callable__ inline StaticArray( const Value& v1, const Value& v2, const Value& v3 ); StaticArray( const Value& v1, const Value& v2, const Value& v3 ); /** * \brief Gets type of this array. Loading @@ -98,13 +98,13 @@ public: * \brief Gets all data of this static array. */ __cuda_callable__ inline Value* getData(); Value* getData(); /** * \brief Gets all data of this static array. */ __cuda_callable__ inline const Value* getData() const; const Value* getData() const; /** * \brief Accesses specified element at the position \e i and returns a reference to its value. Loading @@ -112,7 +112,7 @@ public: * \param i Index position of an element. */ __cuda_callable__ inline const Value& operator[]( int i ) const; const Value& operator[]( int i ) const; /** * \brief Accesses specified element at the position \e i and returns a reference to its value. Loading @@ -120,44 +120,44 @@ public: * \param i Index position of an element. */ __cuda_callable__ inline Value& operator[]( int i ); Value& operator[]( int i ); /** \brief Returns the first coordinate.*/ __cuda_callable__ inline Value& x(); Value& x(); /** \brief Returns the first coordinate.*/ __cuda_callable__ inline const Value& x() const; const Value& x() const; /** \brief Returns the second coordinate for arrays with Size >= 2.*/ __cuda_callable__ inline Value& y(); Value& y(); /** \brief Returns the second coordinate for arrays with Size >= 2.*/ __cuda_callable__ inline const Value& y() const; const Value& y() const; /** \brief Returns the third coordinate for arrays with Size >= 3..*/ __cuda_callable__ inline Value& z(); Value& z(); /** \brief Returns the third coordinate for arrays with Size >= 3..*/ __cuda_callable__ inline const Value& z() const; const Value& z() const; /** * \brief Assigns another static \e array to this array, replacing its current contents. */ __cuda_callable__ inline StaticArray< Size, Value >& operator=( const StaticArray< Size, Value >& array ); StaticArray< Size, Value >& operator=( const StaticArray< Size, Value >& array ); /** * \brief Assigns another static \e array to this array, replacing its current contents. */ template< typename Array > __cuda_callable__ inline StaticArray< Size, Value >& operator=( const Array& array ); StaticArray< Size, Value >& operator=( const Array& array ); /** * \brief This function checks whether this static array is equal to another \e array. Loading @@ -166,7 +166,7 @@ public: */ template< typename Array > __cuda_callable__ inline bool operator==( const Array& array ) const; bool operator==( const Array& array ) const; /** * \brief This function checks whether this static array is not equal to another \e array. Loading @@ -175,7 +175,7 @@ public: */ template< typename Array > __cuda_callable__ inline bool operator!=( const Array& array ) const; bool operator!=( const Array& array ) const; template< typename OtherValue > __cuda_callable__ Loading @@ -185,7 +185,7 @@ public: * \brief Sets all values of this static array to \e val. */ __cuda_callable__ inline void setValue( const ValueType& val ); void setValue( const ValueType& val ); /** * \brief Saves this static array into the \e file. Loading
src/TNL/Containers/StaticArray.hpp +17 −17 Original line number Diff line number Diff line Loading @@ -116,14 +116,14 @@ StaticArray< Size, Value >::StaticArray( const Value v[ Size ] ) template< int Size, typename Value > __cuda_callable__ inline StaticArray< Size, Value >::StaticArray( const Value& v ) StaticArray< Size, Value >::StaticArray( const Value& v ) { StaticFor< 0, Size >::exec( detail::assignValueLambda< Value >, data, v ); } template< int Size, typename Value > __cuda_callable__ inline StaticArray< Size, Value >::StaticArray( const StaticArray< Size, Value >& v ) StaticArray< Size, Value >::StaticArray( const StaticArray< Size, Value >& v ) { StaticFor< 0, Size >::exec( detail::assignArrayLambda< Value >, data, v.getData() ); } Loading Loading @@ -167,21 +167,21 @@ String StaticArray< Size, Value >::getType() template< int Size, typename Value > __cuda_callable__ inline Value* StaticArray< Size, Value >::getData() Value* StaticArray< Size, Value >::getData() { return data; } template< int Size, typename Value > __cuda_callable__ inline const Value* StaticArray< Size, Value >::getData() const const Value* StaticArray< Size, Value >::getData() const { return data; } template< int Size, typename Value > __cuda_callable__ inline const Value& StaticArray< Size, Value >::operator[]( int i ) const const Value& StaticArray< Size, Value >::operator[]( int i ) const { TNL_ASSERT_GE( i, 0, "Element index must be non-negative." ); TNL_ASSERT_LT( i, Size, "Element index is out of bounds." ); Loading @@ -190,7 +190,7 @@ inline const Value& StaticArray< Size, Value >::operator[]( int i ) const template< int Size, typename Value > __cuda_callable__ inline Value& StaticArray< Size, Value >::operator[]( int i ) Value& StaticArray< Size, Value >::operator[]( int i ) { TNL_ASSERT_GE( i, 0, "Element index must be non-negative." ); TNL_ASSERT_LT( i, Size, "Element index is out of bounds." ); Loading @@ -198,21 +198,21 @@ inline Value& StaticArray< Size, Value >::operator[]( int i ) } template< int Size, typename Value > __cuda_callable__ inline Value& StaticArray< Size, Value >::x() Value& StaticArray< Size, Value >::x() { return data[ 0 ]; } template< int Size, typename Value > __cuda_callable__ inline const Value& StaticArray< Size, Value >::x() const const Value& StaticArray< Size, Value >::x() const { return data[ 0 ]; } template< int Size, typename Value > __cuda_callable__ inline Value& StaticArray< Size, Value >::y() Value& StaticArray< Size, Value >::y() { static_assert( Size > 1, "Cannot call StaticArray< Size, Value >::y() for arrays with Size < 2." ); return data[ 1 ]; Loading @@ -220,7 +220,7 @@ inline Value& StaticArray< Size, Value >::y() template< int Size, typename Value > __cuda_callable__ inline const Value& StaticArray< Size, Value >::y() const const Value& StaticArray< Size, Value >::y() const { static_assert( Size > 1, "Cannot call StaticArray< Size, Value >::y() for arrays with Size < 2." ); return data[ 1 ]; Loading @@ -228,7 +228,7 @@ inline const Value& StaticArray< Size, Value >::y() const template< int Size, typename Value > __cuda_callable__ inline Value& StaticArray< Size, Value >::z() Value& StaticArray< Size, Value >::z() { static_assert( Size > 1, "Cannot call StaticArray< Size, Value >::z() for arrays with Size < 3." ); return data[ 2 ]; Loading @@ -236,7 +236,7 @@ inline Value& StaticArray< Size, Value >::z() template< int Size, typename Value > __cuda_callable__ inline const Value& StaticArray< Size, Value >::z() const const Value& StaticArray< Size, Value >::z() const { static_assert( Size > 1, "Cannot call StaticArray< Size, Value >::z() for arrays with Size < 3." ); return data[ 2 ]; Loading @@ -244,7 +244,7 @@ inline const Value& StaticArray< Size, Value >::z() const template< int Size, typename Value > __cuda_callable__ inline StaticArray< Size, Value >& StaticArray< Size, Value >::operator=( const StaticArray< Size, Value >& array ) StaticArray< Size, Value >& StaticArray< Size, Value >::operator=( const StaticArray< Size, Value >& array ) { StaticFor< 0, Size >::exec( detail::assignArrayLambda< Value >, data, array.getData() ); return *this; Loading @@ -253,7 +253,7 @@ inline StaticArray< Size, Value >& StaticArray< Size, Value >::operator=( const template< int Size, typename Value > template< typename Array > __cuda_callable__ inline StaticArray< Size, Value >& StaticArray< Size, Value >::operator=( const Array& array ) StaticArray< Size, Value >& StaticArray< Size, Value >::operator=( const Array& array ) { StaticFor< 0, Size >::exec( detail::assignArrayLambda< Value, typename Array::ValueType >, data, array.getData() ); return *this; Loading @@ -262,7 +262,7 @@ inline StaticArray< Size, Value >& StaticArray< Size, Value >::operator=( const template< int Size, typename Value > template< typename Array > __cuda_callable__ inline bool StaticArray< Size, Value >::operator==( const Array& array ) const bool StaticArray< Size, Value >::operator==( const Array& array ) const { return detail::StaticArrayComparator< Size, Value, typename Array::ValueType, 0 >::EQ( *this, array ); } Loading @@ -270,7 +270,7 @@ inline bool StaticArray< Size, Value >::operator==( const Array& array ) const template< int Size, typename Value > template< typename Array > __cuda_callable__ inline bool StaticArray< Size, Value >::operator!=( const Array& array ) const bool StaticArray< Size, Value >::operator!=( const Array& array ) const { return ! this->operator==( array ); } Loading @@ -288,7 +288,7 @@ operator StaticArray< Size, OtherValue >() const template< int Size, typename Value > __cuda_callable__ inline void StaticArray< Size, Value >::setValue( const ValueType& val ) void StaticArray< Size, Value >::setValue( const ValueType& val ) { StaticFor< 0, Size >::exec( detail::assignValueLambda< Value >, data, val ); } Loading