Commit 587074ed authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Replacing reduction parameter size with begin and end to have the same interface as paralell for.

parent 58fc7ce1
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;
}

+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;
}
+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;
}

Loading