Skip to content

Commit

Permalink
Update Custom-Reductions-Built-In-Reducers.md
Browse files Browse the repository at this point in the history
Fixing typos
  • Loading branch information
csiefer2 authored Nov 1, 2023
1 parent 0604522 commit c4f1bb6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ minloc_type minloc;

Kokkos::parallel_reduce( "MinLocReduce", N, KOKKOS_LAMBDA (const int& x, minloc_type& lminloc) {
double val = (1.0*x- 7.2) * (1.0*x- 7.2) + 3.5;
if( val < lminloc.val ) { lminloc.val = val; lminloc.loc = i; }
}, Kokkos::MinLoc<double,int> minloc_reducer(minloc));
if( val < lminloc.val ) { lminloc.val = val; lminloc.loc = x; }
}, Kokkos::MinLoc<double,int>(minloc));

printf("Min: %lf at %i\n", minloc.val, minloc.loc);
```
Expand Down

0 comments on commit c4f1bb6

Please sign in to comment.