Loading src/core/tnlFile.h +8 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,10 @@ template< typename Type, typename Device, typename Index > bool tnlFile :: read( Type* buffer, const Index& elements ) { tnlAssert( elements >= 0, cerr << " elements = " << elements << endl; ); if( ! elements ) return true; if( ! fileOK ) { cerr << "File " << fileName << " was not properly opened. " << endl; Loading Loading @@ -230,6 +234,10 @@ template< class Type, typename Device, typename Index > bool tnlFile :: write( const Type* buffer, const Index elements ) { tnlAssert( elements >= 0, cerr << " elements = " << elements << endl; ); if( ! elements ) return true; if( ! fileOK ) { cerr << "File " << fileName << " was not properly opened. " << endl; Loading src/implementation/core/arrays/tnlArrayIO.h +7 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,10 @@ class tnlArrayIO< Element, Device, Index, true > { for( Index i = 0; i < elements; i++ ) if( ! data[ i ].save( file ) ) { cerr << "I was not able to save " << i << "-th of " << elements << " elements." << endl; return false; } return true; } Loading @@ -51,12 +54,15 @@ class tnlArrayIO< Element, Device, Index, true > { for( Index i = 0; i < elements; i++ ) if( ! data[ i ].load( file ) ) { cerr << "I was not able to load " << i << "-th of " << elements << " elements." << endl; return false; } return true; } }; template< typename Element template< typename Element, typename Device, typename Index > class tnlArrayIO< Element, Device, Index, false > Loading src/implementation/core/arrays/tnlArray_impl.h +2 −2 Original line number Diff line number Diff line Loading @@ -51,8 +51,8 @@ template< typename Element, tnlString tnlArray< Element, Device, Index > :: getType() { return tnlString( "tnlArray< " ) + getParameterType< Element >() + Device :: getDeviceType() + getParameterType< Element >() + ", " + Device :: getDeviceType() + ", " + getParameterType< Index >() + " >"; }; Loading src/implementation/core/arrays/tnlStaticArray1D_impl.h +4 −2 Original line number Diff line number Diff line Loading @@ -164,11 +164,13 @@ bool tnlStaticArray< 1, Element >::save( tnlFile& file ) const { #ifdef HAVE_NOT_CXX11 if( ! file. write< Element, tnlHost, int >( data, size ) ) cerr << "Unable to write " << getType() << "." << endl; #else if( ! file. write( data, size ) ) cerr << "Unable to write " << getType() << "." << endl; #endif { cerr << "Unable to write " << getType() << "." << endl; return false; } return true; } Loading src/implementation/core/arrays/tnlStaticArray2D_impl.h +4 −2 Original line number Diff line number Diff line Loading @@ -199,11 +199,13 @@ bool tnlStaticArray< 2, Element >::save( tnlFile& file ) const { #ifdef HAVE_NOT_CXX11 if( ! file. write< Element, tnlHost, int >( data, size ) ) cerr << "Unable to write " << getType() << "." << endl; #else if( ! file. write( data, size ) ) cerr << "Unable to write " << getType() << "." << endl; #endif { cerr << "Unable to write " << getType() << "." << endl; return false; } return true; } Loading Loading
src/core/tnlFile.h +8 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,10 @@ template< typename Type, typename Device, typename Index > bool tnlFile :: read( Type* buffer, const Index& elements ) { tnlAssert( elements >= 0, cerr << " elements = " << elements << endl; ); if( ! elements ) return true; if( ! fileOK ) { cerr << "File " << fileName << " was not properly opened. " << endl; Loading Loading @@ -230,6 +234,10 @@ template< class Type, typename Device, typename Index > bool tnlFile :: write( const Type* buffer, const Index elements ) { tnlAssert( elements >= 0, cerr << " elements = " << elements << endl; ); if( ! elements ) return true; if( ! fileOK ) { cerr << "File " << fileName << " was not properly opened. " << endl; Loading
src/implementation/core/arrays/tnlArrayIO.h +7 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,10 @@ class tnlArrayIO< Element, Device, Index, true > { for( Index i = 0; i < elements; i++ ) if( ! data[ i ].save( file ) ) { cerr << "I was not able to save " << i << "-th of " << elements << " elements." << endl; return false; } return true; } Loading @@ -51,12 +54,15 @@ class tnlArrayIO< Element, Device, Index, true > { for( Index i = 0; i < elements; i++ ) if( ! data[ i ].load( file ) ) { cerr << "I was not able to load " << i << "-th of " << elements << " elements." << endl; return false; } return true; } }; template< typename Element template< typename Element, typename Device, typename Index > class tnlArrayIO< Element, Device, Index, false > Loading
src/implementation/core/arrays/tnlArray_impl.h +2 −2 Original line number Diff line number Diff line Loading @@ -51,8 +51,8 @@ template< typename Element, tnlString tnlArray< Element, Device, Index > :: getType() { return tnlString( "tnlArray< " ) + getParameterType< Element >() + Device :: getDeviceType() + getParameterType< Element >() + ", " + Device :: getDeviceType() + ", " + getParameterType< Index >() + " >"; }; Loading
src/implementation/core/arrays/tnlStaticArray1D_impl.h +4 −2 Original line number Diff line number Diff line Loading @@ -164,11 +164,13 @@ bool tnlStaticArray< 1, Element >::save( tnlFile& file ) const { #ifdef HAVE_NOT_CXX11 if( ! file. write< Element, tnlHost, int >( data, size ) ) cerr << "Unable to write " << getType() << "." << endl; #else if( ! file. write( data, size ) ) cerr << "Unable to write " << getType() << "." << endl; #endif { cerr << "Unable to write " << getType() << "." << endl; return false; } return true; } Loading
src/implementation/core/arrays/tnlStaticArray2D_impl.h +4 −2 Original line number Diff line number Diff line Loading @@ -199,11 +199,13 @@ bool tnlStaticArray< 2, Element >::save( tnlFile& file ) const { #ifdef HAVE_NOT_CXX11 if( ! file. write< Element, tnlHost, int >( data, size ) ) cerr << "Unable to write " << getType() << "." << endl; #else if( ! file. write( data, size ) ) cerr << "Unable to write " << getType() << "." << endl; #endif { cerr << "Unable to write " << getType() << "." << endl; return false; } return true; } Loading