27 template<
template<
typename...>
class T_TupleLike,
typename... T_Entries>
28 inline int executeForEach(
auto&& callable, T_TupleLike<T_Entries...>
const& tuple)
33 [=](
auto const&... tupleEntry)
36 (std::same_as<
ALPAKA_TYPEOF(callable(tupleEntry)),
int> && ...),
37 "The callable must return 'int'.");
38 return (
static_cast<bool>(callable(tupleEntry)) || ...);
63 auto exe = [=](
auto const& devSpec)
66 if(devSelector.isAvailable())
68 return callable(devSpec);
#define ALPAKA_TYPEOF(...)
Get the type of instance.
Concept to check that a device specification with an API and device kind can be extracted.
Functionality which is usable on the host CPU controller thread.
int executeForEachIfHasDevice(auto &&callable, std::tuple< T_DeviceSpecs... > const &tupleOfDeviceSpecs)
!
auto makeDeviceSelector(T_DeviceSpec deviceSpec)
create an object to get access to devices
int executeForEach(auto &&callable, T_TupleLike< T_Entries... > const &tuple)
!