Tpetra: Add optional 'atomic' argument to sumIntoLocalValue(s)
Created by: mhoemmen
@trilinos/tpetra
For Tpetra::MultiVector
, Tpetra::Vector
, and Tpetra::CrsMatrix
, add an optional bool atomic
argument to sumIntoLocalValue
resp. sumIntoLocalValues
. If true, use Kokkos::atomic_add
to do the +=
; else, use +=
. The default value of atomic
should depend on the class' execution space: it should be false if and only if the execution space is Kokkos::Serial
(so that existing MPI-only users don't have to pay for atomic updates).