Loading src/core/tnlSharedArray.h +3 −1 Original line number Diff line number Diff line Loading @@ -93,7 +93,9 @@ class tnlSharedArray : public tnlObject void touch( IndexType2 touches = 1 ) const; //! Method for saving the object to a file as a binary data. virtual bool save( tnlFile& file ) const; bool save( tnlFile& file ) const; bool save( const tnlString& fileName ) const; protected: Loading src/core/tnlSharedVector.h +4 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,10 @@ class tnlSharedVector : public tnlSharedArray< Real, Device, Index > template< typename Vector > bool operator != ( const Vector& array ) const; bool save( tnlFile& file ) const; bool save( const tnlString& fileName ) const; Real max() const; Real min() const; Loading src/implementation/CMakeLists.txt +1 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ SET( headers ) set( tnl_implementation_SOURCES ${tnl_implementation_core_SOURCES} ${tnl_implementation_mesh_SOURCES} ${tnl_implementation_solvers_SOURCES} PARENT_SCOPE ) Loading src/implementation/core/tnlSharedArray_impl.h +11 −1 Original line number Diff line number Diff line Loading @@ -278,7 +278,7 @@ template< typename Element, bool tnlSharedArray< Element, Device, Index > :: save( tnlFile& file ) const { tnlAssert( this -> size != 0, cerr << "You try to save empty vector. Its name is " << this -> getName() ); cerr << "You try to save empty array. Its name is " << this -> getName() ); if( ! tnlObject :: save( file ) ) return false; if( ! file. write( &this -> size, 1 ) ) Loading @@ -292,6 +292,16 @@ bool tnlSharedArray< Element, Device, Index > :: save( tnlFile& file ) const return true; }; template< typename Element, typename Device, typename Index > bool tnlSharedArray< Element, Device, Index > :: save( const tnlString& fileName ) const { return tnlObject :: save( fileName ); }; //}; // namespace implementation #endif /* TNLSHAREDARRAY_H_IMPLEMENTATION */ src/implementation/core/tnlSharedVector_impl.h +28 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,34 @@ bool tnlSharedVector< Real, Device, Index > :: operator != ( const Vector& vecto return tnlSharedArray< Real, Device, Index > :: operator == ( vector ); } template< typename Element, typename Device, typename Index > bool tnlSharedVector< Element, Device, Index > :: save( tnlFile& file ) const { tnlAssert( this -> size != 0, cerr << "You try to save empty vector. Its name is " << this -> getName() ); if( ! tnlObject :: save( file ) ) return false; if( ! file. write( &this -> size, 1 ) ) return false; if( ! file. write< Element, Device, Index >( this -> data, this -> size ) ) { cerr << "I was not able to SAVE tnlSharedVector " << this -> getName() << " with size " << this -> getSize() << endl; return false; } return true; }; template< typename Element, typename Device, typename Index > bool tnlSharedVector< Element, Device, Index > :: save( const tnlString& fileName ) const { return tnlObject :: save( fileName ); }; template< typename Real, typename Device, typename Index > Loading Loading
src/core/tnlSharedArray.h +3 −1 Original line number Diff line number Diff line Loading @@ -93,7 +93,9 @@ class tnlSharedArray : public tnlObject void touch( IndexType2 touches = 1 ) const; //! Method for saving the object to a file as a binary data. virtual bool save( tnlFile& file ) const; bool save( tnlFile& file ) const; bool save( const tnlString& fileName ) const; protected: Loading
src/core/tnlSharedVector.h +4 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,10 @@ class tnlSharedVector : public tnlSharedArray< Real, Device, Index > template< typename Vector > bool operator != ( const Vector& array ) const; bool save( tnlFile& file ) const; bool save( const tnlString& fileName ) const; Real max() const; Real min() const; Loading
src/implementation/CMakeLists.txt +1 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ SET( headers ) set( tnl_implementation_SOURCES ${tnl_implementation_core_SOURCES} ${tnl_implementation_mesh_SOURCES} ${tnl_implementation_solvers_SOURCES} PARENT_SCOPE ) Loading
src/implementation/core/tnlSharedArray_impl.h +11 −1 Original line number Diff line number Diff line Loading @@ -278,7 +278,7 @@ template< typename Element, bool tnlSharedArray< Element, Device, Index > :: save( tnlFile& file ) const { tnlAssert( this -> size != 0, cerr << "You try to save empty vector. Its name is " << this -> getName() ); cerr << "You try to save empty array. Its name is " << this -> getName() ); if( ! tnlObject :: save( file ) ) return false; if( ! file. write( &this -> size, 1 ) ) Loading @@ -292,6 +292,16 @@ bool tnlSharedArray< Element, Device, Index > :: save( tnlFile& file ) const return true; }; template< typename Element, typename Device, typename Index > bool tnlSharedArray< Element, Device, Index > :: save( const tnlString& fileName ) const { return tnlObject :: save( fileName ); }; //}; // namespace implementation #endif /* TNLSHAREDARRAY_H_IMPLEMENTATION */
src/implementation/core/tnlSharedVector_impl.h +28 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,34 @@ bool tnlSharedVector< Real, Device, Index > :: operator != ( const Vector& vecto return tnlSharedArray< Real, Device, Index > :: operator == ( vector ); } template< typename Element, typename Device, typename Index > bool tnlSharedVector< Element, Device, Index > :: save( tnlFile& file ) const { tnlAssert( this -> size != 0, cerr << "You try to save empty vector. Its name is " << this -> getName() ); if( ! tnlObject :: save( file ) ) return false; if( ! file. write( &this -> size, 1 ) ) return false; if( ! file. write< Element, Device, Index >( this -> data, this -> size ) ) { cerr << "I was not able to SAVE tnlSharedVector " << this -> getName() << " with size " << this -> getSize() << endl; return false; } return true; }; template< typename Element, typename Device, typename Index > bool tnlSharedVector< Element, Device, Index > :: save( const tnlString& fileName ) const { return tnlObject :: save( fileName ); }; template< typename Real, typename Device, typename Index > Loading