Loading src/Examples/FileExample.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -9,16 +9,15 @@ int main() { File file; file.open( String("new-file.tnl"), File::Mode::Out ); file.open( String("new-file.tnl"), std::ios_base::out ); String title("'string to file'"); file << title; file.close(); file.open( String("new-file.tnl"), File::Mode::In ); file.open( String("new-file.tnl"), std::ios_base::in ); String restoredString; file >> restoredString; file.close(); cout << "restored string = " << restoredString <<endl; } src/Examples/FileExampleCuda.cu +2 −2 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ int main() * Save array to file. */ File file; file.open( "test-file.tnl", File::Mode::Out | File::Mode::Truncate ); file.open( "test-file.tnl", std::ios_base::out | std::ios_base::trunc ); file.save< double, double, Devices::Host >( doubleArray, size ); file.close(); Loading @@ -30,7 +30,7 @@ int main() /*** * Read array from the file to device */ file.open( "test-file.tnl", File::Mode::In ); file.open( "test-file.tnl", std::ios_base::in ); file.load< double, double, Devices::Cuda >( deviceArray, size ); file.close(); Loading src/Examples/FileExampleSaveAndLoad.cpp +3 −5 Original line number Diff line number Diff line Loading @@ -17,21 +17,21 @@ int main() * Save the array of doubles as floats. */ File file; file.open( "test-file.tnl", File::Mode::Out | File::Mode::Truncate ); file.open( "test-file.tnl", std::ios_base::out | std::ios_base::trunc ); file.save< double, float, Devices::Host >( doubleArray, size ); file.close(); /*** * Load the array of floats from the file. */ file.open( "test-file.tnl", File::Mode::In ); file.open( "test-file.tnl", std::ios_base::in ); file.load< float, float, Devices::Host >( floatArray, size ); file.close(); /*** * Load the array of floats from the file and convert them to integers. */ file.open( "test-file.tnl", File::Mode::In ); file.open( "test-file.tnl", std::ios_base::in ); file.load< int, float, Devices::Host >( intArray, size ); file.close(); Loading @@ -44,5 +44,3 @@ int main() << floatArray[ i ] << " -- " << intArray[ i ] << std::endl; } src/Examples/StringExample.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -47,11 +47,11 @@ int main( int argc, char* argv[] ) cout << "string1 is not empty" << endl; File myFile; myFile.open( "string_save.out", File::Mode::Out ); myFile.open( "string_save.out", std::ios_base::out ); myFile << string1; myFile.close(); myFile.open( "string_save.out", File::Mode::In ); myFile.open( "string_save.out", std::ios_base::in ); myFile >> string3; cout << "string 3 after loading = " << string3 << endl; } src/TNL/Containers/ArrayView.hpp +2 −2 Original line number Diff line number Diff line Loading @@ -379,7 +379,7 @@ ArrayView< Value, Device, Index >:: save( const String& fileName ) const { File file; file.open( fileName, File::Mode::Out ); file.open( fileName, std::ios_base::out ); this->save( file ); } Loading @@ -391,7 +391,7 @@ ArrayView< Value, Device, Index >:: load( const String& fileName ) { File file; file.open( fileName, File::Mode::In ); file.open( fileName, std::ios_base::in ); this->load( file ); } Loading Loading
src/Examples/FileExample.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -9,16 +9,15 @@ int main() { File file; file.open( String("new-file.tnl"), File::Mode::Out ); file.open( String("new-file.tnl"), std::ios_base::out ); String title("'string to file'"); file << title; file.close(); file.open( String("new-file.tnl"), File::Mode::In ); file.open( String("new-file.tnl"), std::ios_base::in ); String restoredString; file >> restoredString; file.close(); cout << "restored string = " << restoredString <<endl; }
src/Examples/FileExampleCuda.cu +2 −2 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ int main() * Save array to file. */ File file; file.open( "test-file.tnl", File::Mode::Out | File::Mode::Truncate ); file.open( "test-file.tnl", std::ios_base::out | std::ios_base::trunc ); file.save< double, double, Devices::Host >( doubleArray, size ); file.close(); Loading @@ -30,7 +30,7 @@ int main() /*** * Read array from the file to device */ file.open( "test-file.tnl", File::Mode::In ); file.open( "test-file.tnl", std::ios_base::in ); file.load< double, double, Devices::Cuda >( deviceArray, size ); file.close(); Loading
src/Examples/FileExampleSaveAndLoad.cpp +3 −5 Original line number Diff line number Diff line Loading @@ -17,21 +17,21 @@ int main() * Save the array of doubles as floats. */ File file; file.open( "test-file.tnl", File::Mode::Out | File::Mode::Truncate ); file.open( "test-file.tnl", std::ios_base::out | std::ios_base::trunc ); file.save< double, float, Devices::Host >( doubleArray, size ); file.close(); /*** * Load the array of floats from the file. */ file.open( "test-file.tnl", File::Mode::In ); file.open( "test-file.tnl", std::ios_base::in ); file.load< float, float, Devices::Host >( floatArray, size ); file.close(); /*** * Load the array of floats from the file and convert them to integers. */ file.open( "test-file.tnl", File::Mode::In ); file.open( "test-file.tnl", std::ios_base::in ); file.load< int, float, Devices::Host >( intArray, size ); file.close(); Loading @@ -44,5 +44,3 @@ int main() << floatArray[ i ] << " -- " << intArray[ i ] << std::endl; }
src/Examples/StringExample.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -47,11 +47,11 @@ int main( int argc, char* argv[] ) cout << "string1 is not empty" << endl; File myFile; myFile.open( "string_save.out", File::Mode::Out ); myFile.open( "string_save.out", std::ios_base::out ); myFile << string1; myFile.close(); myFile.open( "string_save.out", File::Mode::In ); myFile.open( "string_save.out", std::ios_base::in ); myFile >> string3; cout << "string 3 after loading = " << string3 << endl; }
src/TNL/Containers/ArrayView.hpp +2 −2 Original line number Diff line number Diff line Loading @@ -379,7 +379,7 @@ ArrayView< Value, Device, Index >:: save( const String& fileName ) const { File file; file.open( fileName, File::Mode::Out ); file.open( fileName, std::ios_base::out ); this->save( file ); } Loading @@ -391,7 +391,7 @@ ArrayView< Value, Device, Index >:: load( const String& fileName ) { File file; file.open( fileName, File::Mode::In ); file.open( fileName, std::ios_base::in ); this->load( file ); } Loading