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

Refactoring tnl-view.

parent 6ae56ba0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@

TARGET=TNL
INSTALL_PREFIX=${HOME}/local
WITH_CUDA=yes
WITH_CUDA=no
WITH_CUSPARSE=no
CUDA_ARCHITECTURE=2.0
TEMPLATE_EXPLICIT_INSTANTIATION=yes
+16 −0
Original line number Diff line number Diff line
@@ -93,6 +93,10 @@ class tnlMultiArray< 1, Element, Device, Index > : public tnlArray< Element, Dev
   //! Method for restoring the object from a file
   bool load( tnlFile& file );

   bool save( const tnlString& fileName ) const;

   bool load( const tnlString& fileName );

   protected:

   tnlTuple< 1, Index > dimensions;
@@ -162,6 +166,10 @@ class tnlMultiArray< 2, Element, Device, Index > : public tnlArray< Element, Dev
   //! Method for restoring the object from a file
   bool load( tnlFile& file );

   bool save( const tnlString& fileName ) const;

   bool load( const tnlString& fileName );

   protected:

   tnlTuple< 2, Index > dimensions;
@@ -232,6 +240,10 @@ class tnlMultiArray< 3, Element, Device, Index > : public tnlArray< Element, Dev
   //! Method for restoring the object from a file
   bool load( tnlFile& file );

   bool save( const tnlString& fileName ) const;

   bool load( const tnlString& fileName );

   protected:

   tnlTuple< 3, Index > dimensions;
@@ -302,6 +314,10 @@ class tnlMultiArray< 4, Element, Device, Index > : public tnlArray< Element, Dev
   //! Method for restoring the object from a file
   bool load( tnlFile& file );

   bool save( const tnlString& fileName ) const;

   bool load( const tnlString& fileName );

   protected:

   tnlTuple< 4, Index > dimensions;
+16 −0
Original line number Diff line number Diff line
@@ -92,6 +92,10 @@ class tnlMultiVector< 1, Element, Device, Index > : public tnlVector< Element, D
   //! Method for restoring the object from a file
   bool load( tnlFile& file );

   bool save( const tnlString& fileName ) const;

   bool load( const tnlString& fileName );

   protected:

   tnlTuple< 1, Index > dimensions;
@@ -161,6 +165,10 @@ class tnlMultiVector< 2, Element, Device, Index > : public tnlVector< Element, D
   //! Method for restoring the object from a file
   bool load( tnlFile& file );

   bool save( const tnlString& fileName ) const;

   bool load( const tnlString& fileName );

   protected:

   tnlTuple< 2, Index > dimensions;
@@ -231,6 +239,10 @@ class tnlMultiVector< 3, Element, Device, Index > : public tnlVector< Element, D
   //! Method for restoring the object from a file
   bool load( tnlFile& file );

   bool save( const tnlString& fileName ) const;

   bool load( const tnlString& fileName );

   protected:

   tnlTuple< 3, Index > dimensions;
@@ -301,6 +313,10 @@ class tnlMultiVector< 4, Element, Device, Index > : public tnlVector< Element, D
   //! Method for restoring the object from a file
   bool load( tnlFile& file );

   bool save( const tnlString& fileName ) const;

   bool load( const tnlString& fileName );

   protected:

   tnlTuple< 4, Index > dimensions;
+12 −0
Original line number Diff line number Diff line
@@ -204,6 +204,18 @@ bool tnlMultiArray< 1, Element, Device, Index > :: load( tnlFile& file )
   return true;
}

template< typename Element, typename Device, typename Index >
bool tnlMultiArray< 1, Element, Device, Index > :: save( const tnlString& fileName ) const
{
   return tnlObject :: save( fileName );
}

template< typename Element, typename Device, typename Index >
bool tnlMultiArray< 1, Element, Device, Index > :: load( const tnlString& fileName )
{
   return tnlObject :: load( fileName );
}

template< typename Element, typename Device, typename Index >
ostream& operator << ( ostream& str, const tnlMultiArray< 1, Element, Device, Index >& array )
{
+12 −0
Original line number Diff line number Diff line
@@ -212,6 +212,18 @@ bool tnlMultiArray< 2, Element, Device, Index > :: load( tnlFile& file )
   return true;
}

template< typename Element, typename Device, typename Index >
bool tnlMultiArray< 2, Element, Device, Index > :: save( const tnlString& fileName ) const
{
   return tnlObject :: save( fileName );
}

template< typename Element, typename Device, typename Index >
bool tnlMultiArray< 2, Element, Device, Index > :: load( const tnlString& fileName )
{
   return tnlObject :: load( fileName );
}

template< typename Element, typename Device, typename Index >
ostream& operator << ( ostream& str, const tnlMultiArray< 2, Element, Device, Index >& array )
{
Loading