Loading src/TNL/Experimental/Multimaps/EllpackIndexMultimapValues.h +16 −0 Original line number Original line Diff line number Diff line Loading @@ -13,6 +13,8 @@ #include <type_traits> #include <type_traits> #include <ostream> #include <ostream> #include <TNL/Devices/Cuda.h> namespace TNL { namespace TNL { template< typename Index, template< typename Index, Loading @@ -31,33 +33,47 @@ class EllpackIndexMultimapValues using LocalIndexType = LocalIndex; using LocalIndexType = LocalIndex; using NetworkType = EllpackIndexMultimap< IndexType, DeviceType, LocalIndexType >; using NetworkType = EllpackIndexMultimap< IndexType, DeviceType, LocalIndexType >; __cuda_callable__ EllpackIndexMultimapValues(); EllpackIndexMultimapValues(); __cuda_callable__ EllpackIndexMultimapValues( EllpackIndexMultimapValues&& other ); EllpackIndexMultimapValues( EllpackIndexMultimapValues&& other ); __cuda_callable__ EllpackIndexMultimapValues& operator=( const EllpackIndexMultimapValues& ); EllpackIndexMultimapValues& operator=( const EllpackIndexMultimapValues& ); __cuda_callable__ EllpackIndexMultimapValues& operator=( EllpackIndexMultimapValues&& other ); EllpackIndexMultimapValues& operator=( EllpackIndexMultimapValues&& other ); __cuda_callable__ void bind( const EllpackIndexMultimapValues& other ); void bind( const EllpackIndexMultimapValues& other ); __cuda_callable__ bool setSize( const LocalIndexType& portsCount ); bool setSize( const LocalIndexType& portsCount ); __cuda_callable__ LocalIndexType getSize() const; LocalIndexType getSize() const; __cuda_callable__ LocalIndexType getAllocatedSize() const; LocalIndexType getAllocatedSize() const; __cuda_callable__ void setValue( const LocalIndexType& portIndex, void setValue( const LocalIndexType& portIndex, const IndexType& value ); const IndexType& value ); __cuda_callable__ IndexType getValue( const LocalIndexType& portIndex ) const; IndexType getValue( const LocalIndexType& portIndex ) const; __cuda_callable__ IndexType& operator[]( const LocalIndexType& portIndex ); IndexType& operator[]( const LocalIndexType& portIndex ); __cuda_callable__ const IndexType& operator[]( const LocalIndexType& portIndex ) const; const IndexType& operator[]( const LocalIndexType& portIndex ) const; __cuda_callable__ bool operator==( const EllpackIndexMultimapValues& other ) const; bool operator==( const EllpackIndexMultimapValues& other ) const; __cuda_callable__ bool operator!=( const EllpackIndexMultimapValues& other ) const; bool operator!=( const EllpackIndexMultimapValues& other ) const; void print( std::ostream& str ) const; void print( std::ostream& str ) const; Loading src/TNL/Experimental/Multimaps/EllpackIndexMultimapValues_impl.h +14 −0 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,7 @@ namespace TNL { template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues() EllpackIndexMultimapValues() : values( nullptr ), valuesCount( nullptr ), allocatedSize( 0 ) : values( nullptr ), valuesCount( nullptr ), allocatedSize( 0 ) Loading @@ -28,6 +29,7 @@ EllpackIndexMultimapValues() template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues( EllpackIndexMultimapValues&& other ) EllpackIndexMultimapValues( EllpackIndexMultimapValues&& other ) : values( other.values ), valuesCount( other.valuesCount ), allocatedSize( other.allocatedSize ) : values( other.values ), valuesCount( other.valuesCount ), allocatedSize( other.allocatedSize ) Loading @@ -40,6 +42,7 @@ EllpackIndexMultimapValues( EllpackIndexMultimapValues&& other ) template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ EllpackIndexMultimapValues< Index, Device, LocalIndex >& EllpackIndexMultimapValues< Index, Device, LocalIndex >& EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: operator=( const EllpackIndexMultimapValues& other ) operator=( const EllpackIndexMultimapValues& other ) Loading @@ -55,6 +58,7 @@ operator=( const EllpackIndexMultimapValues& other ) template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ EllpackIndexMultimapValues< Index, Device, LocalIndex >& EllpackIndexMultimapValues< Index, Device, LocalIndex >& EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: operator=( EllpackIndexMultimapValues&& other ) operator=( EllpackIndexMultimapValues&& other ) Loading @@ -71,6 +75,7 @@ operator=( EllpackIndexMultimapValues&& other ) template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ void void EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: bind( const EllpackIndexMultimapValues& other ) bind( const EllpackIndexMultimapValues& other ) Loading Loading @@ -98,6 +103,7 @@ EllpackIndexMultimapValues( IndexType* values, template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ bool bool EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: setSize( const LocalIndexType& size ) setSize( const LocalIndexType& size ) Loading @@ -111,6 +117,7 @@ setSize( const LocalIndexType& size ) template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ LocalIndex LocalIndex EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: getSize() const getSize() const Loading @@ -123,6 +130,7 @@ getSize() const template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ LocalIndex LocalIndex EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: getAllocatedSize() const getAllocatedSize() const Loading @@ -133,6 +141,7 @@ getAllocatedSize() const template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ void void EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: setValue( const LocalIndexType& portIndex, setValue( const LocalIndexType& portIndex, Loading @@ -148,6 +157,7 @@ setValue( const LocalIndexType& portIndex, template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ Index Index EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: getValue( const LocalIndexType& portIndex ) const getValue( const LocalIndexType& portIndex ) const Loading @@ -162,6 +172,7 @@ getValue( const LocalIndexType& portIndex ) const template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ Index& Index& EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: operator[]( const LocalIndexType& portIndex ) operator[]( const LocalIndexType& portIndex ) Loading @@ -176,6 +187,7 @@ operator[]( const LocalIndexType& portIndex ) template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ const Index& const Index& EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: operator[]( const LocalIndexType& portIndex ) const operator[]( const LocalIndexType& portIndex ) const Loading @@ -190,6 +202,7 @@ operator[]( const LocalIndexType& portIndex ) const template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ bool bool EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: operator==( const EllpackIndexMultimapValues& other ) const operator==( const EllpackIndexMultimapValues& other ) const Loading @@ -205,6 +218,7 @@ operator==( const EllpackIndexMultimapValues& other ) const template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ bool bool EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: operator!=( const EllpackIndexMultimapValues& other ) const operator!=( const EllpackIndexMultimapValues& other ) const Loading src/TNL/Experimental/Multimaps/StaticEllpackIndexMultimapValues.h +13 −0 Original line number Original line Diff line number Diff line Loading @@ -13,6 +13,8 @@ #include <type_traits> #include <type_traits> #include <ostream> #include <ostream> #include <TNL/Devices/Cuda.h> namespace TNL { namespace TNL { template< int ValuesCount, template< int ValuesCount, Loading @@ -33,31 +35,42 @@ class StaticEllpackIndexMultimapValues using LocalIndexType = LocalIndex; using LocalIndexType = LocalIndex; using NetworkType = StaticEllpackIndexMultimap< ValuesCount, IndexType, DeviceType, LocalIndexType >; using NetworkType = StaticEllpackIndexMultimap< ValuesCount, IndexType, DeviceType, LocalIndexType >; __cuda_callable__ StaticEllpackIndexMultimapValues(); StaticEllpackIndexMultimapValues(); __cuda_callable__ StaticEllpackIndexMultimapValues( StaticEllpackIndexMultimapValues&& other ); StaticEllpackIndexMultimapValues( StaticEllpackIndexMultimapValues&& other ); __cuda_callable__ StaticEllpackIndexMultimapValues& operator=( const StaticEllpackIndexMultimapValues& ); StaticEllpackIndexMultimapValues& operator=( const StaticEllpackIndexMultimapValues& ); __cuda_callable__ StaticEllpackIndexMultimapValues& operator=( StaticEllpackIndexMultimapValues&& other ); StaticEllpackIndexMultimapValues& operator=( StaticEllpackIndexMultimapValues&& other ); __cuda_callable__ void bind( const StaticEllpackIndexMultimapValues& other ); void bind( const StaticEllpackIndexMultimapValues& other ); constexpr LocalIndexType getSize() const; constexpr LocalIndexType getSize() const; constexpr LocalIndexType getAllocatedSize() const; constexpr LocalIndexType getAllocatedSize() const; __cuda_callable__ void setValue( const LocalIndexType& portIndex, void setValue( const LocalIndexType& portIndex, const IndexType& value ); const IndexType& value ); __cuda_callable__ IndexType getValue( const LocalIndexType& portIndex ) const; IndexType getValue( const LocalIndexType& portIndex ) const; __cuda_callable__ IndexType& operator[]( const LocalIndexType& portIndex ); IndexType& operator[]( const LocalIndexType& portIndex ); __cuda_callable__ const IndexType& operator[]( const LocalIndexType& portIndex ) const; const IndexType& operator[]( const LocalIndexType& portIndex ) const; __cuda_callable__ bool operator==( const StaticEllpackIndexMultimapValues& other ) const; bool operator==( const StaticEllpackIndexMultimapValues& other ) const; __cuda_callable__ bool operator!=( const StaticEllpackIndexMultimapValues& other ) const; bool operator!=( const StaticEllpackIndexMultimapValues& other ) const; void print( std::ostream& str ) const; void print( std::ostream& str ) const; Loading src/TNL/Experimental/Multimaps/StaticEllpackIndexMultimapValues_impl.h +11 −0 Original line number Original line Diff line number Diff line Loading @@ -20,6 +20,7 @@ template< int ValuesCount, typename Index, typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues() StaticEllpackIndexMultimapValues() : values( nullptr ) : values( nullptr ) Loading @@ -30,6 +31,7 @@ template< int ValuesCount, typename Index, typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues( StaticEllpackIndexMultimapValues&& other ) StaticEllpackIndexMultimapValues( StaticEllpackIndexMultimapValues&& other ) : values( other.values ) : values( other.values ) Loading @@ -41,6 +43,7 @@ template< int ValuesCount, typename Index, typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >& StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >& StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: operator=( const StaticEllpackIndexMultimapValues& other ) operator=( const StaticEllpackIndexMultimapValues& other ) Loading @@ -56,6 +59,7 @@ template< int ValuesCount, typename Index, typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >& StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >& StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: operator=( StaticEllpackIndexMultimapValues&& other ) operator=( StaticEllpackIndexMultimapValues&& other ) Loading @@ -69,6 +73,7 @@ template< int ValuesCount, typename Index, typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ void void StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: bind( const StaticEllpackIndexMultimapValues& other ) bind( const StaticEllpackIndexMultimapValues& other ) Loading Loading @@ -113,6 +118,7 @@ template< int ValuesCount, typename Index, typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ void void StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: setValue( const LocalIndexType& portIndex, setValue( const LocalIndexType& portIndex, Loading @@ -131,6 +137,7 @@ template< int ValuesCount, typename Index, typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ Index Index StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: getValue( const LocalIndexType& portIndex ) const getValue( const LocalIndexType& portIndex ) const Loading @@ -148,6 +155,7 @@ template< int ValuesCount, typename Index, typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ Index& Index& StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: operator[]( const LocalIndexType& portIndex ) operator[]( const LocalIndexType& portIndex ) Loading @@ -165,6 +173,7 @@ template< int ValuesCount, typename Index, typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ const Index& const Index& StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: operator[]( const LocalIndexType& portIndex ) const operator[]( const LocalIndexType& portIndex ) const Loading @@ -182,6 +191,7 @@ template< int ValuesCount, typename Index, typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ bool bool StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: operator==( const StaticEllpackIndexMultimapValues& other ) const operator==( const StaticEllpackIndexMultimapValues& other ) const Loading @@ -200,6 +210,7 @@ template< int ValuesCount, typename Index, typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ bool bool StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: operator!=( const StaticEllpackIndexMultimapValues& other ) const operator!=( const StaticEllpackIndexMultimapValues& other ) const Loading Loading
src/TNL/Experimental/Multimaps/EllpackIndexMultimapValues.h +16 −0 Original line number Original line Diff line number Diff line Loading @@ -13,6 +13,8 @@ #include <type_traits> #include <type_traits> #include <ostream> #include <ostream> #include <TNL/Devices/Cuda.h> namespace TNL { namespace TNL { template< typename Index, template< typename Index, Loading @@ -31,33 +33,47 @@ class EllpackIndexMultimapValues using LocalIndexType = LocalIndex; using LocalIndexType = LocalIndex; using NetworkType = EllpackIndexMultimap< IndexType, DeviceType, LocalIndexType >; using NetworkType = EllpackIndexMultimap< IndexType, DeviceType, LocalIndexType >; __cuda_callable__ EllpackIndexMultimapValues(); EllpackIndexMultimapValues(); __cuda_callable__ EllpackIndexMultimapValues( EllpackIndexMultimapValues&& other ); EllpackIndexMultimapValues( EllpackIndexMultimapValues&& other ); __cuda_callable__ EllpackIndexMultimapValues& operator=( const EllpackIndexMultimapValues& ); EllpackIndexMultimapValues& operator=( const EllpackIndexMultimapValues& ); __cuda_callable__ EllpackIndexMultimapValues& operator=( EllpackIndexMultimapValues&& other ); EllpackIndexMultimapValues& operator=( EllpackIndexMultimapValues&& other ); __cuda_callable__ void bind( const EllpackIndexMultimapValues& other ); void bind( const EllpackIndexMultimapValues& other ); __cuda_callable__ bool setSize( const LocalIndexType& portsCount ); bool setSize( const LocalIndexType& portsCount ); __cuda_callable__ LocalIndexType getSize() const; LocalIndexType getSize() const; __cuda_callable__ LocalIndexType getAllocatedSize() const; LocalIndexType getAllocatedSize() const; __cuda_callable__ void setValue( const LocalIndexType& portIndex, void setValue( const LocalIndexType& portIndex, const IndexType& value ); const IndexType& value ); __cuda_callable__ IndexType getValue( const LocalIndexType& portIndex ) const; IndexType getValue( const LocalIndexType& portIndex ) const; __cuda_callable__ IndexType& operator[]( const LocalIndexType& portIndex ); IndexType& operator[]( const LocalIndexType& portIndex ); __cuda_callable__ const IndexType& operator[]( const LocalIndexType& portIndex ) const; const IndexType& operator[]( const LocalIndexType& portIndex ) const; __cuda_callable__ bool operator==( const EllpackIndexMultimapValues& other ) const; bool operator==( const EllpackIndexMultimapValues& other ) const; __cuda_callable__ bool operator!=( const EllpackIndexMultimapValues& other ) const; bool operator!=( const EllpackIndexMultimapValues& other ) const; void print( std::ostream& str ) const; void print( std::ostream& str ) const; Loading
src/TNL/Experimental/Multimaps/EllpackIndexMultimapValues_impl.h +14 −0 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,7 @@ namespace TNL { template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues() EllpackIndexMultimapValues() : values( nullptr ), valuesCount( nullptr ), allocatedSize( 0 ) : values( nullptr ), valuesCount( nullptr ), allocatedSize( 0 ) Loading @@ -28,6 +29,7 @@ EllpackIndexMultimapValues() template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues( EllpackIndexMultimapValues&& other ) EllpackIndexMultimapValues( EllpackIndexMultimapValues&& other ) : values( other.values ), valuesCount( other.valuesCount ), allocatedSize( other.allocatedSize ) : values( other.values ), valuesCount( other.valuesCount ), allocatedSize( other.allocatedSize ) Loading @@ -40,6 +42,7 @@ EllpackIndexMultimapValues( EllpackIndexMultimapValues&& other ) template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ EllpackIndexMultimapValues< Index, Device, LocalIndex >& EllpackIndexMultimapValues< Index, Device, LocalIndex >& EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: operator=( const EllpackIndexMultimapValues& other ) operator=( const EllpackIndexMultimapValues& other ) Loading @@ -55,6 +58,7 @@ operator=( const EllpackIndexMultimapValues& other ) template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ EllpackIndexMultimapValues< Index, Device, LocalIndex >& EllpackIndexMultimapValues< Index, Device, LocalIndex >& EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: operator=( EllpackIndexMultimapValues&& other ) operator=( EllpackIndexMultimapValues&& other ) Loading @@ -71,6 +75,7 @@ operator=( EllpackIndexMultimapValues&& other ) template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ void void EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: bind( const EllpackIndexMultimapValues& other ) bind( const EllpackIndexMultimapValues& other ) Loading Loading @@ -98,6 +103,7 @@ EllpackIndexMultimapValues( IndexType* values, template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ bool bool EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: setSize( const LocalIndexType& size ) setSize( const LocalIndexType& size ) Loading @@ -111,6 +117,7 @@ setSize( const LocalIndexType& size ) template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ LocalIndex LocalIndex EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: getSize() const getSize() const Loading @@ -123,6 +130,7 @@ getSize() const template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ LocalIndex LocalIndex EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: getAllocatedSize() const getAllocatedSize() const Loading @@ -133,6 +141,7 @@ getAllocatedSize() const template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ void void EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: setValue( const LocalIndexType& portIndex, setValue( const LocalIndexType& portIndex, Loading @@ -148,6 +157,7 @@ setValue( const LocalIndexType& portIndex, template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ Index Index EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: getValue( const LocalIndexType& portIndex ) const getValue( const LocalIndexType& portIndex ) const Loading @@ -162,6 +172,7 @@ getValue( const LocalIndexType& portIndex ) const template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ Index& Index& EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: operator[]( const LocalIndexType& portIndex ) operator[]( const LocalIndexType& portIndex ) Loading @@ -176,6 +187,7 @@ operator[]( const LocalIndexType& portIndex ) template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ const Index& const Index& EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: operator[]( const LocalIndexType& portIndex ) const operator[]( const LocalIndexType& portIndex ) const Loading @@ -190,6 +202,7 @@ operator[]( const LocalIndexType& portIndex ) const template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ bool bool EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: operator==( const EllpackIndexMultimapValues& other ) const operator==( const EllpackIndexMultimapValues& other ) const Loading @@ -205,6 +218,7 @@ operator==( const EllpackIndexMultimapValues& other ) const template< typename Index, template< typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ bool bool EllpackIndexMultimapValues< Index, Device, LocalIndex >:: EllpackIndexMultimapValues< Index, Device, LocalIndex >:: operator!=( const EllpackIndexMultimapValues& other ) const operator!=( const EllpackIndexMultimapValues& other ) const Loading
src/TNL/Experimental/Multimaps/StaticEllpackIndexMultimapValues.h +13 −0 Original line number Original line Diff line number Diff line Loading @@ -13,6 +13,8 @@ #include <type_traits> #include <type_traits> #include <ostream> #include <ostream> #include <TNL/Devices/Cuda.h> namespace TNL { namespace TNL { template< int ValuesCount, template< int ValuesCount, Loading @@ -33,31 +35,42 @@ class StaticEllpackIndexMultimapValues using LocalIndexType = LocalIndex; using LocalIndexType = LocalIndex; using NetworkType = StaticEllpackIndexMultimap< ValuesCount, IndexType, DeviceType, LocalIndexType >; using NetworkType = StaticEllpackIndexMultimap< ValuesCount, IndexType, DeviceType, LocalIndexType >; __cuda_callable__ StaticEllpackIndexMultimapValues(); StaticEllpackIndexMultimapValues(); __cuda_callable__ StaticEllpackIndexMultimapValues( StaticEllpackIndexMultimapValues&& other ); StaticEllpackIndexMultimapValues( StaticEllpackIndexMultimapValues&& other ); __cuda_callable__ StaticEllpackIndexMultimapValues& operator=( const StaticEllpackIndexMultimapValues& ); StaticEllpackIndexMultimapValues& operator=( const StaticEllpackIndexMultimapValues& ); __cuda_callable__ StaticEllpackIndexMultimapValues& operator=( StaticEllpackIndexMultimapValues&& other ); StaticEllpackIndexMultimapValues& operator=( StaticEllpackIndexMultimapValues&& other ); __cuda_callable__ void bind( const StaticEllpackIndexMultimapValues& other ); void bind( const StaticEllpackIndexMultimapValues& other ); constexpr LocalIndexType getSize() const; constexpr LocalIndexType getSize() const; constexpr LocalIndexType getAllocatedSize() const; constexpr LocalIndexType getAllocatedSize() const; __cuda_callable__ void setValue( const LocalIndexType& portIndex, void setValue( const LocalIndexType& portIndex, const IndexType& value ); const IndexType& value ); __cuda_callable__ IndexType getValue( const LocalIndexType& portIndex ) const; IndexType getValue( const LocalIndexType& portIndex ) const; __cuda_callable__ IndexType& operator[]( const LocalIndexType& portIndex ); IndexType& operator[]( const LocalIndexType& portIndex ); __cuda_callable__ const IndexType& operator[]( const LocalIndexType& portIndex ) const; const IndexType& operator[]( const LocalIndexType& portIndex ) const; __cuda_callable__ bool operator==( const StaticEllpackIndexMultimapValues& other ) const; bool operator==( const StaticEllpackIndexMultimapValues& other ) const; __cuda_callable__ bool operator!=( const StaticEllpackIndexMultimapValues& other ) const; bool operator!=( const StaticEllpackIndexMultimapValues& other ) const; void print( std::ostream& str ) const; void print( std::ostream& str ) const; Loading
src/TNL/Experimental/Multimaps/StaticEllpackIndexMultimapValues_impl.h +11 −0 Original line number Original line Diff line number Diff line Loading @@ -20,6 +20,7 @@ template< int ValuesCount, typename Index, typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues() StaticEllpackIndexMultimapValues() : values( nullptr ) : values( nullptr ) Loading @@ -30,6 +31,7 @@ template< int ValuesCount, typename Index, typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues( StaticEllpackIndexMultimapValues&& other ) StaticEllpackIndexMultimapValues( StaticEllpackIndexMultimapValues&& other ) : values( other.values ) : values( other.values ) Loading @@ -41,6 +43,7 @@ template< int ValuesCount, typename Index, typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >& StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >& StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: operator=( const StaticEllpackIndexMultimapValues& other ) operator=( const StaticEllpackIndexMultimapValues& other ) Loading @@ -56,6 +59,7 @@ template< int ValuesCount, typename Index, typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >& StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >& StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: operator=( StaticEllpackIndexMultimapValues&& other ) operator=( StaticEllpackIndexMultimapValues&& other ) Loading @@ -69,6 +73,7 @@ template< int ValuesCount, typename Index, typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ void void StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: bind( const StaticEllpackIndexMultimapValues& other ) bind( const StaticEllpackIndexMultimapValues& other ) Loading Loading @@ -113,6 +118,7 @@ template< int ValuesCount, typename Index, typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ void void StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: setValue( const LocalIndexType& portIndex, setValue( const LocalIndexType& portIndex, Loading @@ -131,6 +137,7 @@ template< int ValuesCount, typename Index, typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ Index Index StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: getValue( const LocalIndexType& portIndex ) const getValue( const LocalIndexType& portIndex ) const Loading @@ -148,6 +155,7 @@ template< int ValuesCount, typename Index, typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ Index& Index& StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: operator[]( const LocalIndexType& portIndex ) operator[]( const LocalIndexType& portIndex ) Loading @@ -165,6 +173,7 @@ template< int ValuesCount, typename Index, typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ const Index& const Index& StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: operator[]( const LocalIndexType& portIndex ) const operator[]( const LocalIndexType& portIndex ) const Loading @@ -182,6 +191,7 @@ template< int ValuesCount, typename Index, typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ bool bool StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: operator==( const StaticEllpackIndexMultimapValues& other ) const operator==( const StaticEllpackIndexMultimapValues& other ) const Loading @@ -200,6 +210,7 @@ template< int ValuesCount, typename Index, typename Index, typename Device, typename Device, typename LocalIndex > typename LocalIndex > __cuda_callable__ bool bool StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: StaticEllpackIndexMultimapValues< ValuesCount, Index, Device, LocalIndex >:: operator!=( const StaticEllpackIndexMultimapValues& other ) const operator!=( const StaticEllpackIndexMultimapValues& other ) const Loading