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

Deleting core/containers.

parent c000c8b4
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
ADD_SUBDIRECTORY( containers )
ADD_SUBDIRECTORY( multimaps )

set (headers 
+0 −29
Original line number Diff line number Diff line
set( headers tnlContainer.h
             tnlContainer_impl.h
             tnlStaticContainer.h
             tnlStaticContainer_impl.h
             tnlUniqueContainer.h             
             tnlUniqueContainer_impl.h )

SET( CURRENT_DIR ${CMAKE_SOURCE_DIR}/src/TNL/core/containers )
set( common_SOURCES )       

IF( BUILD_CUDA )
   set( tnl_core_containers_CUDA__SOURCES
        ${common_SOURCES}             
        ${CURRENT_DIR}/tnlContainer_impl.cu
        ${CURRENT_DIR}/tnlStaticContainer_impl.cu
        PARENT_SCOPE )
ELSE()
   set( common_SOURCES
        ${common_SOURCES}
         )               
ENDIF()    

set( tnl_core_containers_SOURCES     
     ${common_SOURCES}          
     ${CURRENT_DIR}/tnlContainer_impl.cpp
     ${CURRENT_DIR}/tnlStaticContainer_impl.cpp
     PARENT_SCOPE )
        
INSTALL( FILES ${headers} DESTINATION include/tnl-${tnlVersion}/TNL/core/containers )
+0 −58
Original line number Diff line number Diff line
/***************************************************************************
                          tnlContainer.h  -  description
                             -------------------
    begin                : Feb 11, 2014
    copyright            : (C) 2014 by Tomas Oberhuber
    email                : tomas.oberhuber@fjfi.cvut.cz
 ***************************************************************************/

/* See Copyright Notice in tnl/Copyright */

#pragma once

#include <TNL/Object.h>
#include <TNL/Containers/Array.h>

namespace TNL {

template< typename Element, typename Device = Devices::Host, typename Index = int >
class tnlContainer : public Object
{
   public:

   typedef Element ElementType;
   typedef Index IndexType;

   tnlContainer();

   tnlContainer( const IndexType size );

   static String getType();

   bool setSize( const IndexType size );

   IndexType getSize() const;

   void reset();

   ElementType& operator[]( const IndexType id );

   const ElementType& operator[]( const IndexType id ) const;

   ElementType getElement( const IndexType id ) const;

   void setElement( const IndexType id,
                    const ElementType& data );

   bool save( File& file ) const;

   bool load( File& file );

   protected:

   Containers::Array< Element, Device, Index > data;
};

} // namespace TNL

#include <TNL/core/containers/tnlContainer_impl.h>
+0 −33
Original line number Diff line number Diff line
/***************************************************************************
                          tnlContainer_impl.cpp  -  description
                             -------------------
    begin                : Feb 11, 2014
    copyright            : (C) 2014 by Tomas Oberhuber
    email                : tomas.oberhuber@fjfi.cvut.cz
 ***************************************************************************/

/* See Copyright Notice in tnl/Copyright */

#include <TNL/core/containers/tnlContainer.h>

namespace TNL {

#ifdef TEMPLATE_EXPLICIT_INSTANTIATION

template class tnlContainer< float, Devices::Host, int >;
template class tnlContainer< double, Devices::Host, int >;
template class tnlContainer< float, Devices::Host, long int >;
template class tnlContainer< double, Devices::Host, long int >;

#ifndef HAVE_CUDA
template class tnlContainer< float, Devices::Cuda, int >;
template class tnlContainer< double, Devices::Cuda, int >;
template class tnlContainer< float, Devices::Cuda, long int >;
template class tnlContainer< double, Devices::Cuda, long int >;
#endif

#endif

} // namespace TNL

+0 −26
Original line number Diff line number Diff line
/***************************************************************************
                          tnlContainer_impl.cu  -  description
                             -------------------
    begin                : Feb 11, 2014
    copyright            : (C) 2014 by Tomas Oberhuber
    email                : tomas.oberhuber@fjfi.cvut.cz
 ***************************************************************************/

/* See Copyright Notice in tnl/Copyright */

#include <TNL/core/containers/tnlContainer.h>

namespace TNL {

#ifdef TEMPLATE_EXPLICIT_INSTANTIATION

#ifdef HAVE_CUDA
template class tnlContainer< float, Devices::Cuda, int >;
template class tnlContainer< double, Devices::Cuda, int >;
template class tnlContainer< float, Devices::Cuda, long int >;
template class tnlContainer< double, Devices::Cuda, long int >;
#endif

#endif

} // namespace TNL
Loading