Commit 395ad564 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Working on the documentation of dense matrices.

parent a7202f62
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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 );
   };

   /***
@@ -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;
+3 −3
Original line number Diff line number Diff line
@@ -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;
+177 −97

File changed.

Preview size limit exceeded, changes collapsed.