Loading src/TNL/Containers/Algorithms/ArrayIO.h +4 −2 Original line number Diff line number Diff line Loading @@ -71,14 +71,16 @@ class ArrayIO< Value, Device, Index, false > const Value* data, const Index elements ) { return file.save< Value, Value, Device >( data, elements ); file.save< Value, Value, Device >( data, elements ); return true; } static bool load( File& file, Value* data, const Index elements ) { return file.load< Value, Value, Device >( data, elements ); file.load< Value, Value, Device >( data, elements ); return true; } }; Loading src/TNL/Containers/Array_impl.h +5 −7 Original line number Diff line number Diff line Loading @@ -474,8 +474,7 @@ bool Array< Value, Device, Index >::save( File& file ) const { if( ! Object::save( file ) ) return false; if( ! file.save( &this->size ) ) return false; file.save( &this->size ); if( this->size != 0 && ! Algorithms::ArrayIO< Value, Device, Index >::save( file, this->data, this->size ) ) { std::cerr << "I was not able to save " << this->getType() Loading @@ -495,11 +494,11 @@ load( File& file ) if( ! Object::load( file ) ) return false; Index _size; if( ! file.load( &_size ) ) { file.load( &_size ); /*{ std::cerr << "Unable to read the array size." << std::endl; return false; } }*/ if( _size < 0 ) { std::cerr << "Error: The size " << _size << " of the file is not a positive number or zero." << std::endl; Loading Loading @@ -528,8 +527,7 @@ boundLoad( File& file ) if( ! Object::load( file ) ) return false; Index _size; if( ! file.load( &_size ) ) return false; file.load( &_size ); if( _size < 0 ) { std::cerr << "Error: The size " << _size << " of the file is not a positive number or zero." << std::endl; Loading src/TNL/Containers/Multimaps/EllpackIndexMultimap_impl.h +4 −8 Original line number Diff line number Diff line Loading @@ -244,10 +244,8 @@ save( File& file ) const { if( ! Object::save( file ) ) return false; if( ! file.save( &this->keysRange ) ) return false; if( ! file.save( &this->maxValuesCount ) ) return false; file.save( &this->keysRange ); file.save( &this->maxValuesCount ); if( ! this->values.save( file ) ) return false; if( ! this->valuesCounts.save( file ) ) Loading @@ -265,10 +263,8 @@ load( File& file ) { if( ! Object::load( file ) ) return false; if( ! file.load( &this->keysRange ) ) return false; if( ! file.load( &this->maxValuesCount ) ) return false; file.load( &this->keysRange ); file.load( &this->maxValuesCount ); if( ! this->values.load( file ) ) return false; if( ! this->valuesCounts.load( file ) ) Loading src/TNL/Containers/Multimaps/StaticEllpackIndexMultimap_impl.h +2 −4 Original line number Diff line number Diff line Loading @@ -203,8 +203,7 @@ save( File& file ) const { if( ! Object::save( file ) ) return false; if( ! file.save( &this->keysRange ) ) return false; file.save( &this->keysRange ); if( ! this->values.save( file ) ) return false; return true; Loading @@ -221,8 +220,7 @@ load( File& file ) { if( ! Object::load( file ) ) return false; if( ! file.load( &this->keysRange ) ) return false; file.load( &this->keysRange ); if( ! this->values.load( file ) ) return false; return true; Loading src/TNL/Containers/StaticArray1D_impl.h +2 −10 Original line number Diff line number Diff line Loading @@ -162,22 +162,14 @@ inline void StaticArray< 1, Value >::setValue( const ValueType& val ) template< typename Value > bool StaticArray< 1, Value >::save( File& file ) const { if( ! file.save< Value, Value, Devices::Host >( data, size ) ) { std::cerr << "Unable to write " << getType() << "." << std::endl; return false; } file.save< Value, Value, Devices::Host >( data, size ); return true; } template< typename Value > bool StaticArray< 1, Value >::load( File& file) { if( ! file.load< Value, Value, Devices::Host >( data, size ) ) { std::cerr << "Unable to read " << getType() << "." << std::endl; return false; } file.load< Value, Value, Devices::Host >( data, size ); return true; } Loading Loading
src/TNL/Containers/Algorithms/ArrayIO.h +4 −2 Original line number Diff line number Diff line Loading @@ -71,14 +71,16 @@ class ArrayIO< Value, Device, Index, false > const Value* data, const Index elements ) { return file.save< Value, Value, Device >( data, elements ); file.save< Value, Value, Device >( data, elements ); return true; } static bool load( File& file, Value* data, const Index elements ) { return file.load< Value, Value, Device >( data, elements ); file.load< Value, Value, Device >( data, elements ); return true; } }; Loading
src/TNL/Containers/Array_impl.h +5 −7 Original line number Diff line number Diff line Loading @@ -474,8 +474,7 @@ bool Array< Value, Device, Index >::save( File& file ) const { if( ! Object::save( file ) ) return false; if( ! file.save( &this->size ) ) return false; file.save( &this->size ); if( this->size != 0 && ! Algorithms::ArrayIO< Value, Device, Index >::save( file, this->data, this->size ) ) { std::cerr << "I was not able to save " << this->getType() Loading @@ -495,11 +494,11 @@ load( File& file ) if( ! Object::load( file ) ) return false; Index _size; if( ! file.load( &_size ) ) { file.load( &_size ); /*{ std::cerr << "Unable to read the array size." << std::endl; return false; } }*/ if( _size < 0 ) { std::cerr << "Error: The size " << _size << " of the file is not a positive number or zero." << std::endl; Loading Loading @@ -528,8 +527,7 @@ boundLoad( File& file ) if( ! Object::load( file ) ) return false; Index _size; if( ! file.load( &_size ) ) return false; file.load( &_size ); if( _size < 0 ) { std::cerr << "Error: The size " << _size << " of the file is not a positive number or zero." << std::endl; Loading
src/TNL/Containers/Multimaps/EllpackIndexMultimap_impl.h +4 −8 Original line number Diff line number Diff line Loading @@ -244,10 +244,8 @@ save( File& file ) const { if( ! Object::save( file ) ) return false; if( ! file.save( &this->keysRange ) ) return false; if( ! file.save( &this->maxValuesCount ) ) return false; file.save( &this->keysRange ); file.save( &this->maxValuesCount ); if( ! this->values.save( file ) ) return false; if( ! this->valuesCounts.save( file ) ) Loading @@ -265,10 +263,8 @@ load( File& file ) { if( ! Object::load( file ) ) return false; if( ! file.load( &this->keysRange ) ) return false; if( ! file.load( &this->maxValuesCount ) ) return false; file.load( &this->keysRange ); file.load( &this->maxValuesCount ); if( ! this->values.load( file ) ) return false; if( ! this->valuesCounts.load( file ) ) Loading
src/TNL/Containers/Multimaps/StaticEllpackIndexMultimap_impl.h +2 −4 Original line number Diff line number Diff line Loading @@ -203,8 +203,7 @@ save( File& file ) const { if( ! Object::save( file ) ) return false; if( ! file.save( &this->keysRange ) ) return false; file.save( &this->keysRange ); if( ! this->values.save( file ) ) return false; return true; Loading @@ -221,8 +220,7 @@ load( File& file ) { if( ! Object::load( file ) ) return false; if( ! file.load( &this->keysRange ) ) return false; file.load( &this->keysRange ); if( ! this->values.load( file ) ) return false; return true; Loading
src/TNL/Containers/StaticArray1D_impl.h +2 −10 Original line number Diff line number Diff line Loading @@ -162,22 +162,14 @@ inline void StaticArray< 1, Value >::setValue( const ValueType& val ) template< typename Value > bool StaticArray< 1, Value >::save( File& file ) const { if( ! file.save< Value, Value, Devices::Host >( data, size ) ) { std::cerr << "Unable to write " << getType() << "." << std::endl; return false; } file.save< Value, Value, Devices::Host >( data, size ); return true; } template< typename Value > bool StaticArray< 1, Value >::load( File& file) { if( ! file.load< Value, Value, Devices::Host >( data, size ) ) { std::cerr << "Unable to read " << getType() << "." << std::endl; return false; } file.load< Value, Value, Devices::Host >( data, size ); return true; } Loading