Commit 53c48f25 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Changing order of parameters of Algorithms::Reduction::reduce(withArgument)...

Changing order of parameters of Algorithms::Reduction::reduce(withArgument) from (reduce,fetch) to (fetch,reduce).
parent bf7b251a
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( 0, matrix->getRows(), std::plus<>{}, fetch, 0 );
   int trace = TNL::Algorithms::Reduction< Device >::reduce( 0, matrix->getRows(), fetch, std::plus<>{}, 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( 0, matrix.getRows(), std::plus<>{}, fetch, 0 );
   int trace = TNL::Algorithms::Reduction< Device >::reduce( 0, matrix.getRows(), fetch, std::plus<>{}, 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( 0, matrix->getRows(), std::plus<>{}, fetch, 0 );
   int trace = TNL::Algorithms::Reduction< Device >::reduce( 0, matrix->getRows(), fetch, std::plus<>{}, 0 );
   std::cout << "Matrix reads as: " << std::endl << *matrix << std::endl;
   std::cout << "Matrix trace is: " << trace << "." << std::endl;
}
+2 −2
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( 0, matrix.getRows(), std::plus<>{}, fetch, 0 );
   int trace = TNL::Algorithms::Reduction< Device >::reduce( 0, matrix.getRows(), fetch, std::plus<>{}, 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( 0, matrix->getRows(), std::plus<>{}, fetch, 0 );
   int trace = TNL::Algorithms::Reduction< Device >::reduce( 0, matrix->getRows(), fetch, std::plus<>{}, 0 );
   std::cout << "Matrix trace is " << trace << "." << std::endl;
}

Loading