Loading src/TNL/Containers/Array.h +8 −8 Original line number Diff line number Diff line Loading @@ -365,6 +365,14 @@ class Array */ void reset(); /** * \brief Returns \e true if the current array size is zero. * * This method can be called from device kernels. */ __cuda_callable__ bool empty() const; /** * \brief Returns a \e const-qualified raw pointer to the data. * Loading Loading @@ -599,14 +607,6 @@ class Array IndexType begin = 0, IndexType end = 0 ) const; /** * \brief Returns \e true if the current array size is zero. * * This method can be called from device kernels. */ __cuda_callable__ bool empty() const; /** * \brief Method for saving the array to a binary file \e fileName. * Loading src/TNL/Containers/Array.hpp +12 −12 Original line number Diff line number Diff line Loading @@ -436,6 +436,18 @@ reset() this->releaseData(); } template< typename Value, typename Device, typename Index, typename Allocator > bool __cuda_callable__ Array< Value, Device, Index, Allocator >:: empty() const { return data == nullptr; } template< typename Value, typename Device, typename Index, Loading Loading @@ -719,18 +731,6 @@ containsOnlyValue( const ValueType& v, return Algorithms::ArrayOperations< Device >::containsOnlyValue( &this->getData()[ begin ], end - begin, v ); } template< typename Value, typename Device, typename Index, typename Allocator > bool __cuda_callable__ Array< Value, Device, Index, Allocator >:: empty() const { return ( data == nullptr ); } template< typename Value, typename Device, typename Index, Loading src/TNL/Containers/ArrayView.h +8 −8 Original line number Diff line number Diff line Loading @@ -246,6 +246,14 @@ public: __cuda_callable__ void reset(); /** * \brief Returns \e true if the current array view size is zero. * * This method can be called from device kernels. */ __cuda_callable__ bool empty() const; /** * \brief Returns a \e const-qualified raw pointer to the data. * Loading Loading @@ -441,14 +449,6 @@ public: const Index begin = 0, Index end = 0 ) const; /** * \brief Returns \e true if the current array view size is zero. * * This method can be called from device kernels. */ __cuda_callable__ bool empty() const; /** * \brief Method for saving the data to a binary file \e fileName. * Loading src/TNL/Containers/ArrayView.hpp +11 −11 Original line number Diff line number Diff line Loading @@ -165,6 +165,17 @@ reset() size = 0; } template< typename Value, typename Device, typename Index > __cuda_callable__ bool ArrayView< Value, Device, Index >:: empty() const { return data == nullptr; } template< typename Value, typename Device, typename Index > Loading Loading @@ -360,17 +371,6 @@ containsOnlyValue( Value value, return Algorithms::ArrayOperations< Device >::containsOnlyValue( &this->getData()[ begin ], end - begin, value ); } template< typename Value, typename Device, typename Index > __cuda_callable__ bool ArrayView< Value, Device, Index >:: empty() const { return ( data == nullptr ); } template< typename Value, typename Device, typename Index > std::ostream& operator<<( std::ostream& str, const ArrayView< Value, Device, Index >& view ) { Loading src/TNL/Containers/DistributedArray.h +4 −3 Original line number Diff line number Diff line Loading @@ -134,8 +134,12 @@ public: template< typename Array > void setLike( const Array& array ); // Resets the array to the empty state. void reset(); // Returns true if the current array size is zero. bool empty() const; // TODO: swap // Returns the *global* size Loading Loading @@ -177,9 +181,6 @@ public: // Checks if all elements in this array have the same given value bool containsOnlyValue( ValueType value ) const; // Returns true iff non-zero size is set operator bool() const; // TODO: serialization (save, load) protected: Loading Loading
src/TNL/Containers/Array.h +8 −8 Original line number Diff line number Diff line Loading @@ -365,6 +365,14 @@ class Array */ void reset(); /** * \brief Returns \e true if the current array size is zero. * * This method can be called from device kernels. */ __cuda_callable__ bool empty() const; /** * \brief Returns a \e const-qualified raw pointer to the data. * Loading Loading @@ -599,14 +607,6 @@ class Array IndexType begin = 0, IndexType end = 0 ) const; /** * \brief Returns \e true if the current array size is zero. * * This method can be called from device kernels. */ __cuda_callable__ bool empty() const; /** * \brief Method for saving the array to a binary file \e fileName. * Loading
src/TNL/Containers/Array.hpp +12 −12 Original line number Diff line number Diff line Loading @@ -436,6 +436,18 @@ reset() this->releaseData(); } template< typename Value, typename Device, typename Index, typename Allocator > bool __cuda_callable__ Array< Value, Device, Index, Allocator >:: empty() const { return data == nullptr; } template< typename Value, typename Device, typename Index, Loading Loading @@ -719,18 +731,6 @@ containsOnlyValue( const ValueType& v, return Algorithms::ArrayOperations< Device >::containsOnlyValue( &this->getData()[ begin ], end - begin, v ); } template< typename Value, typename Device, typename Index, typename Allocator > bool __cuda_callable__ Array< Value, Device, Index, Allocator >:: empty() const { return ( data == nullptr ); } template< typename Value, typename Device, typename Index, Loading
src/TNL/Containers/ArrayView.h +8 −8 Original line number Diff line number Diff line Loading @@ -246,6 +246,14 @@ public: __cuda_callable__ void reset(); /** * \brief Returns \e true if the current array view size is zero. * * This method can be called from device kernels. */ __cuda_callable__ bool empty() const; /** * \brief Returns a \e const-qualified raw pointer to the data. * Loading Loading @@ -441,14 +449,6 @@ public: const Index begin = 0, Index end = 0 ) const; /** * \brief Returns \e true if the current array view size is zero. * * This method can be called from device kernels. */ __cuda_callable__ bool empty() const; /** * \brief Method for saving the data to a binary file \e fileName. * Loading
src/TNL/Containers/ArrayView.hpp +11 −11 Original line number Diff line number Diff line Loading @@ -165,6 +165,17 @@ reset() size = 0; } template< typename Value, typename Device, typename Index > __cuda_callable__ bool ArrayView< Value, Device, Index >:: empty() const { return data == nullptr; } template< typename Value, typename Device, typename Index > Loading Loading @@ -360,17 +371,6 @@ containsOnlyValue( Value value, return Algorithms::ArrayOperations< Device >::containsOnlyValue( &this->getData()[ begin ], end - begin, value ); } template< typename Value, typename Device, typename Index > __cuda_callable__ bool ArrayView< Value, Device, Index >:: empty() const { return ( data == nullptr ); } template< typename Value, typename Device, typename Index > std::ostream& operator<<( std::ostream& str, const ArrayView< Value, Device, Index >& view ) { Loading
src/TNL/Containers/DistributedArray.h +4 −3 Original line number Diff line number Diff line Loading @@ -134,8 +134,12 @@ public: template< typename Array > void setLike( const Array& array ); // Resets the array to the empty state. void reset(); // Returns true if the current array size is zero. bool empty() const; // TODO: swap // Returns the *global* size Loading Loading @@ -177,9 +181,6 @@ public: // Checks if all elements in this array have the same given value bool containsOnlyValue( ValueType value ) const; // Returns true iff non-zero size is set operator bool() const; // TODO: serialization (save, load) protected: Loading