Commit 7065aef1 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Merge branch 'TO/matrices' into 'develop'

To/matrices

See merge request !63
parents 3f5dab9f 1e39e7c3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ void getRowExample()
   /***
    * Compute the matrix trace.
    */
   int trace = TNL::Algorithms::Reduction< Device >::reduce( matrix->getRows(), std::plus<>{}, fetch, 0 );
   int trace = TNL::Algorithms::Reduction< Device >::reduce( 0, matrix->getRows(), std::plus<>{}, fetch, 0 );
   std::cout << "Matrix trace is " << trace << "." << std::endl;
}

+2 −2
Original line number Diff line number Diff line
@@ -15,14 +15,14 @@ void createMatrixView()
   /***
    * Create dense matrix view with row major order
    */
   TNL::Matrices::DenseMatrixView< double, Device, int, TNL::Containers::Segments::RowMajorOrder > rowMajorMatrix( 3, 4, values.getView() );
   TNL::Matrices::DenseMatrixView< double, Device, int, TNL::Algorithms::Segments::RowMajorOrder > rowMajorMatrix( 3, 4, values.getView() );
   std::cout << "Row major order matrix:" << std::endl;
   std::cout << rowMajorMatrix << std::endl;

   /***
    * Create dense matrix view with column major order
    */
   TNL::Matrices::DenseMatrixView< double, Device, int, TNL::Containers::Segments::RowMajorOrder > columnMajorMatrix( 4, 3, values.getView() );
   TNL::Matrices::DenseMatrixView< double, Device, int, TNL::Algorithms::Segments::RowMajorOrder > columnMajorMatrix( 4, 3, values.getView() );
   std::cout << "Column major order matrix:" << std::endl;
   std::cout << columnMajorMatrix << std::endl;
}
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ void getRowExample()
      return row.getElement( rowIdx );
   };

   int trace = TNL::Algorithms::Reduction< Device >::reduce( matrix.getRows(), std::plus<>{}, fetch, 0 );
   int trace = TNL::Algorithms::Reduction< Device >::reduce( 0, matrix.getRows(), std::plus<>{}, fetch, 0 );
   std::cout << "Matrix trace is " << trace << "." << std::endl;
}

+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ void getRowExample()
   /***
    * Compute the matrix trace.
    */
   int trace = TNL::Algorithms::Reduction< Device >::reduce( matrix->getRows(), std::plus<>{}, fetch, 0 );
   int trace = TNL::Algorithms::Reduction< Device >::reduce( 0, matrix->getRows(), std::plus<>{}, fetch, 0 );
   std::cout << "Matrix reads as: " << std::endl << *matrix << std::endl;
   std::cout << "Matrix trace is: " << trace << "." << std::endl;
}
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ void getRowExample()
   /***
    * Compute the matrix trace.
    */
   int trace = TNL::Algorithms::Reduction< Device >::reduce( matrix.getRows(), std::plus<>{}, fetch, 0 );
   int trace = TNL::Algorithms::Reduction< Device >::reduce( 0, matrix.getRows(), std::plus<>{}, fetch, 0 );
   std::cout << "Matrix reads as: " << std::endl << matrix << std::endl;
   std::cout << "Matrix trace is: " << trace << "." << std::endl;
}
Loading