Commit a6891077 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Renaming Ellpack network to indexed multimap.

parent 3eefaa99
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -5,7 +5,6 @@ ADD_SUBDIRECTORY( core )
ADD_SUBDIRECTORY( debug )
ADD_SUBDIRECTORY( matrices )
ADD_SUBDIRECTORY( mesh )
ADD_SUBDIRECTORY( networks )
ADD_SUBDIRECTORY( operators )
ADD_SUBDIRECTORY( problems )
ADD_SUBDIRECTORY( solvers )
+1 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@ ADD_SUBDIRECTORY( arrays )
ADD_SUBDIRECTORY( containers )
ADD_SUBDIRECTORY( cuda )
ADD_SUBDIRECTORY( vectors )
ADD_SUBDIRECTORY( multimaps )

set (headers tnlAssert.h               
             tnlConstants.h
+20 −0
Original line number Diff line number Diff line
SET( headers tnlEllpackNetwork.h
             tnlEllpackNetwork_impl.h
             tnlEllpackNetworkPorts.h
             tnlEllpackNetworkPorts_impl.h )
SET( headers tnlEllpackIndexMultimap.h
             tnlEllpackIndexMultimap_impl.h
             tnlEllpackIndexMultimapValues.h
             tnlEllpackIndexMultimapValues_impl.h )

SET( CURRENT_DIR ${CMAKE_SOURCE_DIR}/src/networks )
SET( CURRENT_DIR ${CMAKE_SOURCE_DIR}/src/core/multimaps )
set( common_SOURCES
      )       

IF( BUILD_CUDA )
   set( tnl_networks_CUDA__SOURCES
   set( tnl_core_multimaps_CUDA__SOURCES
        ${common_SOURCES}      
        PARENT_SCOPE )
ENDIF()    

set( tnl_networks_SOURCES     
set( tnl_core_multimaps_SOURCES     
     ${common_SOURCES}
     PARENT_SCOPE )
        
INSTALL( FILES ${headers} DESTINATION include/tnl-${tnlVersion}/networks )
 No newline at end of file
INSTALL( FILES ${headers} DESTINATION include/tnl-${tnlVersion}/core/multimaps )
 No newline at end of file
+23 −23
Original line number Diff line number Diff line
/***************************************************************************
                          tnlEllpackNetwork.h  -  description
                          tnlEllpackIndexMultimap.h  -  description
                             -------------------
    begin                : Sep 9, 2015
    copyright            : (C) 2015 by Tomas Oberhuber et al.
@@ -15,58 +15,58 @@
 *                                                                         *
 ***************************************************************************/

#ifndef TNLELLPACKNETWORK_H
#define	TNLELLPACKNETWORK_H
#ifndef TNLELLPACKINDEXMULTIMAP_H
#define	TNLELLPACKINDEXMULTIMAP_H

#include <core/vectors/tnlVector.h>

template< typename Index = int,
          typename Device = tnlHost >
class tnlEllpackNetworkPorts;
class tnlEllpackIndexMultimapValues;

template< typename Index = int,
          typename Device = tnlHost >
class tnlEllpackNetworkConstPorts;
class tnlEllpackIndexMultimapConstValues;

template< typename Index = int,
          typename Device = tnlHost >
class tnlEllpackNetwork
class tnlEllpackIndexMultimap
{
   public:
      
      typedef Device                                                       DeviceType;
      typedef Index                                                        IndexType;
      typedef tnlEllpackNetworkPorts< IndexType, DeviceType >       PortsType;
      typedef tnlEllpackNetworkConstPorts< IndexType, DeviceType >  ConstPortsType;
      typedef tnlVector< IndexType, DeviceType, IndexType >         PortsAllocationVectorType;
      typedef tnlEllpackIndexMultimapValues< IndexType, DeviceType >       ValuesAccessorType;
      typedef tnlEllpackIndexMultimapConstValues< IndexType, DeviceType >  ConstValuesAccessorType;
      typedef tnlVector< IndexType, DeviceType, IndexType >                ValuesAllocationVectorType;
            
      tnlEllpackNetwork();
      tnlEllpackIndexMultimap();
      
      static tnlString getType();

      tnlString getTypeVirtual() const;
      
      void setDimensions( const IndexType inputs,
                          const IndexType outputs );
      void setRanges( const IndexType keysRange,
                      const IndexType valuesRange );
      
      const IndexType getInputsCount() const;
      const IndexType getKeysRange() const;
      
      const IndexType getOutputsCount() const;
      const IndexType getValuesRange() const;
      
      void allocatePorts( const PortsAllocationVectorType& portsCount );
      void allocate( const ValuesAllocationVectorType& portsCount );
      
      PortsType getPorts( const IndexType& inputIndex );
      ValuesAccessorType getValues( const IndexType& inputIndex );
      
      ConstPortsType getPorts( const IndexType& inputIndex ) const;
      ConstValuesAccessorType getValues( const IndexType& inputIndex ) const;
      
   protected:
      
      tnlVector< IndexType, DeviceType, IndexType > ports;
      tnlVector< IndexType, DeviceType, IndexType > values;
      
      IndexType inputs, outputs, portsMaxCount;
      IndexType keysRange, valuesRange, valuesMaxCount;
};

#include <networks/tnlEllpackNetwork_impl.h>
#include <core/multimaps/tnlEllpackIndexMultimap_impl.h>

#endif	/* TNLELLPACKNETWORK_H */
#endif	/* TNLELLPACKINDEXMULTIMAP_H */
+12 −12
Original line number Diff line number Diff line
/***************************************************************************
                          tnlEllpackNetworkPorts.h  -  description
                          tnlEllpackIndexMultimapValues.h  -  description
                             -------------------
    begin                : Sep 10, 2015
    copyright            : (C) 2015 by Tomas Oberhuber et al.
@@ -15,23 +15,23 @@
 *                                                                         *
 ***************************************************************************/

#ifndef TNLELLPACKNETWORKPORTS_H
#define	TNLELLPACKNETWORKPORTS_H
#ifndef TNLELLPACKINDEXMULTIMAPVALUES_H
#define	TNLELLPACKINDEXMULTIMAPVALUES_H

#include <ostream>
#include <networks/tnlEllpackNetwork.h>
#include <core/multimaps/tnlEllpackIndexMultimap.h>

template< typename Index,
          typename Device >
class tnlEllpackNetworkPorts
class tnlEllpackIndexMultimapValues
{
   public:
      
      typedef Device                                     DeviceType;
      typedef Index                                      IndexType;
      typedef tnlEllpackNetwork< IndexType, DeviceType > NetworkType;
      typedef tnlEllpackIndexMultimap< IndexType, DeviceType > NetworkType;
      
      tnlEllpackNetworkPorts();
      tnlEllpackIndexMultimapValues();
      
      IndexType getPortsCount() const;
      
@@ -48,7 +48,7 @@ class tnlEllpackNetworkPorts
      
   protected:
      
      tnlEllpackNetworkPorts( IndexType* ports, 
      tnlEllpackIndexMultimapValues( IndexType* ports, 
                              const IndexType input,
                              const IndexType portsMaxCount );
      
@@ -56,15 +56,15 @@ class tnlEllpackNetworkPorts
      
      IndexType step, portsMaxCount;
      
      friend tnlEllpackNetwork< IndexType, DeviceType >;
      friend tnlEllpackIndexMultimap< IndexType, DeviceType >;
};

template< typename Index,
          typename Device >
std::ostream& operator << ( std::ostream& str, const tnlEllpackNetworkPorts< Index, Device>& ports );
std::ostream& operator << ( std::ostream& str, const tnlEllpackIndexMultimapValues< Index, Device>& ports );

#include <networks/tnlEllpackNetworkPorts_impl.h>
#include <core/multimaps/tnlEllpackIndexMultimapValues_impl.h>


#endif	/* TNLELLPACKNETWORKPORTS_H */
#endif	/* TNLELLPACKINDEXMULTIMAPVALUES_H */
Loading