LastLocScalar¶
The LastLocScalar is a class template that stores a location (index) of the last occurrence satisfying a condition as a single, convenient unit.
It’s designed to hold the result of parallel_reduce() operations using a LastLoc builtin reducer.
It is generally recommended to get this type by using the reducer’s
::value_type member (e.g., LastLoc<Index,Space>::value_type)
to ensure the correct template parameters are used.
Header File: <Kokkos_Core.hpp>
Usage¶
LastLocScalar<Index>::value_type result;
parallel_reduce(N,Functor,LastLocScalar<Index>(result));
I lastLoc = result.max_loc_true;