44 #ifndef TPETRA_FOR_EACH_HPP
45 #define TPETRA_FOR_EACH_HPP
47 #include "TpetraCore_config.h"
48 #include <type_traits>
74 template<
class ExecutionSpace,
75 class GlobalDataStructure,
76 class UserFunctionType>
79 ExecutionSpace execSpace,
80 GlobalDataStructure& X,
97 template<
class GlobalDataStructure,
98 class UserFunctionType>
101 GlobalDataStructure& X,
108 template<
class ExecutionSpace,
109 class GlobalDataStructure,
110 class UserFunctionType>
113 for_each (
const char kernelLabel[],
114 ExecutionSpace execSpace,
115 GlobalDataStructure& X,
121 template<
class ExecutionSpace,
122 class GlobalDataStructure,
123 class UserFunctionType>
126 ExecutionSpace execSpace,
127 GlobalDataStructure& X,
132 typename std::remove_const<GlobalDataStructure>::type,
138 template<
class GlobalDataStructure,
139 class UserFunctionType>
142 GlobalDataStructure& X,
145 using execution_space =
146 typename GlobalDataStructure::device_type::execution_space;
149 typename std::remove_const<GlobalDataStructure>::type,
152 execution_space execSpace;
158 #endif // TPETRA_FOR_EACH_HPP
Specialize this class to implement Tpetra::for_each for specific GlobalDataStructure types...
void for_each(const char kernelLabel[], ExecutionSpace execSpace, GlobalDataStructure &X, UserFunctionType f)
Apply a function entrywise to each local entry of a Tpetra global data structure, analogously to std:...