Loading src/Benchmarks/DistSpMV/tnl-benchmark-distributed-spmv.h +1 −1 Original line number Diff line number Diff line Loading @@ -164,7 +164,7 @@ struct SpmvBenchmark MatrixType matrix; VectorType vector; matrix.load( parameters.getParameter< String >( "input-matrix" ) ); vector.load( parameters.getParameter< String >( "input-vector" ) ); File( parameters.getParameter< String >( "input-vector" ), std::ios_base::in ) >> vector; typename MatrixType::CompressedRowLengthsVector rowLengths; matrix.getCompressedRowLengths( rowLengths ); Loading src/Benchmarks/LinearSolvers/tnl-benchmark-linear-solvers.h +2 −2 Original line number Diff line number Diff line Loading @@ -333,8 +333,8 @@ struct LinearSolversBenchmark SharedPointer< MatrixType > matrixPointer; VectorType x0, b; matrixPointer->load( parameters.getParameter< String >( "input-matrix" ) ); x0.load( parameters.getParameter< String >( "input-dof" ) ); b.load( parameters.getParameter< String >( "input-rhs" ) ); File( parameters.getParameter< String >( "input-dof" ), std::ios_base::in ) >> x0; File( parameters.getParameter< String >( "input-rhs" ), std::ios_base::in ) >> b; typename MatrixType::CompressedRowLengthsVector rowLengths; matrixPointer->getCompressedRowLengths( rowLengths ); Loading src/Examples/Containers/ArrayExample.cpp +7 −5 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ void arrayExample() /*** * You may also assign value to all array elements ... */ a2 = 0.0; a2 = 0; std::cout << "a2 = " << a2 << std::endl; /*** Loading Loading @@ -56,10 +56,12 @@ void arrayExample() a1.swap( a2 ); /*** * Of course, you may save it to file and load again * You may save it to file and load again */ a1.save( "a1.tnl" ); a2.load( "a1.tnl" ); File( "a1.tnl", std::ios_base::out ) << a1; File( "a1.tnl", std::ios_base::in ) >> a2; std::remove( "a1.tnl" ); if( a2 != a1 ) std::cerr << "Something is wrong!!!" << std::endl; Loading src/Examples/Containers/ArrayViewExample.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -57,10 +57,11 @@ void arrayViewExample() a1.swap( a3 ); /*** * Of course, you may save it to file and load again * You may save it to file and load again */ a1.save( "a1.tnl" ); a2.load( "a1.tnl" ); File( "a1.tnl", std::ios_base::out ) << a1; File( "a1.tnl", std::ios_base::in ) >> a2; std::remove( "a1.tnl" ); if( a2 != a1 ) Loading src/Python/pytnl/tnl/Array.h +2 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,8 @@ namespace py = pybind11; template< typename ArrayType > void export_Array(py::module & m, const char* name) { auto array = py::class_<ArrayType, TNL::Object>(m, name, py::buffer_protocol()) // auto array = py::class_<ArrayType, TNL::Object>(m, name, py::buffer_protocol()) auto array = py::class_<ArrayType>(m, name, py::buffer_protocol()) .def(py::init<>()) .def(py::init<int>()) .def_static("getType", &ArrayType::getType) Loading Loading
src/Benchmarks/DistSpMV/tnl-benchmark-distributed-spmv.h +1 −1 Original line number Diff line number Diff line Loading @@ -164,7 +164,7 @@ struct SpmvBenchmark MatrixType matrix; VectorType vector; matrix.load( parameters.getParameter< String >( "input-matrix" ) ); vector.load( parameters.getParameter< String >( "input-vector" ) ); File( parameters.getParameter< String >( "input-vector" ), std::ios_base::in ) >> vector; typename MatrixType::CompressedRowLengthsVector rowLengths; matrix.getCompressedRowLengths( rowLengths ); Loading
src/Benchmarks/LinearSolvers/tnl-benchmark-linear-solvers.h +2 −2 Original line number Diff line number Diff line Loading @@ -333,8 +333,8 @@ struct LinearSolversBenchmark SharedPointer< MatrixType > matrixPointer; VectorType x0, b; matrixPointer->load( parameters.getParameter< String >( "input-matrix" ) ); x0.load( parameters.getParameter< String >( "input-dof" ) ); b.load( parameters.getParameter< String >( "input-rhs" ) ); File( parameters.getParameter< String >( "input-dof" ), std::ios_base::in ) >> x0; File( parameters.getParameter< String >( "input-rhs" ), std::ios_base::in ) >> b; typename MatrixType::CompressedRowLengthsVector rowLengths; matrixPointer->getCompressedRowLengths( rowLengths ); Loading
src/Examples/Containers/ArrayExample.cpp +7 −5 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ void arrayExample() /*** * You may also assign value to all array elements ... */ a2 = 0.0; a2 = 0; std::cout << "a2 = " << a2 << std::endl; /*** Loading Loading @@ -56,10 +56,12 @@ void arrayExample() a1.swap( a2 ); /*** * Of course, you may save it to file and load again * You may save it to file and load again */ a1.save( "a1.tnl" ); a2.load( "a1.tnl" ); File( "a1.tnl", std::ios_base::out ) << a1; File( "a1.tnl", std::ios_base::in ) >> a2; std::remove( "a1.tnl" ); if( a2 != a1 ) std::cerr << "Something is wrong!!!" << std::endl; Loading
src/Examples/Containers/ArrayViewExample.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -57,10 +57,11 @@ void arrayViewExample() a1.swap( a3 ); /*** * Of course, you may save it to file and load again * You may save it to file and load again */ a1.save( "a1.tnl" ); a2.load( "a1.tnl" ); File( "a1.tnl", std::ios_base::out ) << a1; File( "a1.tnl", std::ios_base::in ) >> a2; std::remove( "a1.tnl" ); if( a2 != a1 ) Loading
src/Python/pytnl/tnl/Array.h +2 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,8 @@ namespace py = pybind11; template< typename ArrayType > void export_Array(py::module & m, const char* name) { auto array = py::class_<ArrayType, TNL::Object>(m, name, py::buffer_protocol()) // auto array = py::class_<ArrayType, TNL::Object>(m, name, py::buffer_protocol()) auto array = py::class_<ArrayType>(m, name, py::buffer_protocol()) .def(py::init<>()) .def(py::init<int>()) .def_static("getType", &ArrayType::getType) Loading