Loading Documentation/Examples/Matrices/DenseMatrix/DenseMatrixExample_setElement.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -16,8 +16,8 @@ void setElements() std::cout << "Matrix set from the host:" << std::endl; std::cout << *matrix << std::endl; auto f = [=] __cuda_callable__ ( int i ) mutable { matrix->setElement( i, i, -i ); auto f = [=] __cuda_callable__ ( int i, int j ) mutable { matrix->addElement( i, j, 5.0 ); }; /*** Loading @@ -26,7 +26,7 @@ void setElements() * DenseMatrixView::getRow example for details. */ TNL::Pointers::synchronizeSmartPointersOnDevice< Device >(); TNL::Algorithms::ParallelFor< Device >::exec( 0, 5, f ); TNL::Algorithms::ParallelFor2D< Device >::exec( 0, 0, 5, 5, f ); std::cout << "Matrix set from its native device:" << std::endl; std::cout << *matrix << std::endl; Loading Documentation/Examples/Matrices/DenseMatrix/DenseMatrixViewExample_setElement.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -14,10 +14,10 @@ void setElements() std::cout << "Matrix set from the host:" << std::endl; std::cout << matrix << std::endl; auto f = [=] __cuda_callable__ ( int i ) mutable { matrixView.setElement( i, i, -i ); auto f = [=] __cuda_callable__ ( int i, int j ) mutable { matrixView.addElement( i, j, 5.0 ); }; TNL::Algorithms::ParallelFor< Device >::exec( 0, 5, f ); TNL::Algorithms::ParallelFor2D< Device >::exec( 0, 0, 5, 5, f ); std::cout << "Matrix set from its native device:" << std::endl; std::cout << matrix << std::endl; Loading Documentation/Tutorials/Matrices/tutorial_Matrices.md +177 −97 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
Documentation/Examples/Matrices/DenseMatrix/DenseMatrixExample_setElement.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -16,8 +16,8 @@ void setElements() std::cout << "Matrix set from the host:" << std::endl; std::cout << *matrix << std::endl; auto f = [=] __cuda_callable__ ( int i ) mutable { matrix->setElement( i, i, -i ); auto f = [=] __cuda_callable__ ( int i, int j ) mutable { matrix->addElement( i, j, 5.0 ); }; /*** Loading @@ -26,7 +26,7 @@ void setElements() * DenseMatrixView::getRow example for details. */ TNL::Pointers::synchronizeSmartPointersOnDevice< Device >(); TNL::Algorithms::ParallelFor< Device >::exec( 0, 5, f ); TNL::Algorithms::ParallelFor2D< Device >::exec( 0, 0, 5, 5, f ); std::cout << "Matrix set from its native device:" << std::endl; std::cout << *matrix << std::endl; Loading
Documentation/Examples/Matrices/DenseMatrix/DenseMatrixViewExample_setElement.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -14,10 +14,10 @@ void setElements() std::cout << "Matrix set from the host:" << std::endl; std::cout << matrix << std::endl; auto f = [=] __cuda_callable__ ( int i ) mutable { matrixView.setElement( i, i, -i ); auto f = [=] __cuda_callable__ ( int i, int j ) mutable { matrixView.addElement( i, j, 5.0 ); }; TNL::Algorithms::ParallelFor< Device >::exec( 0, 5, f ); TNL::Algorithms::ParallelFor2D< Device >::exec( 0, 0, 5, 5, f ); std::cout << "Matrix set from its native device:" << std::endl; std::cout << matrix << std::endl; Loading
Documentation/Tutorials/Matrices/tutorial_Matrices.md +177 −97 File changed.Preview size limit exceeded, changes collapsed. Show changes