kokkos-execution 0.0.1
Loading...
Searching...
No Matches
macros.hpp File Reference
#include "Kokkos_Macros.hpp"

Go to the source code of this file.

Macros

#define KOKKOS_EXECUTION_RETURNS_BRACED(_type_, ...)
 Define a function by returning a list-initialized object of an explicit type.

Macro Definition Documentation

◆ KOKKOS_EXECUTION_RETURNS_BRACED

#define KOKKOS_EXECUTION_RETURNS_BRACED ( _type_,
... )
Value:
noexcept(noexcept(KOKKOS_IMPL_STRIP_PARENS(_type_){__VA_ARGS__}))->KOKKOS_IMPL_STRIP_PARENS(_type_) { \
return KOKKOS_IMPL_STRIP_PARENS(_type_){__VA_ARGS__}; \
}

Define a function by returning a list-initialized object of an explicit type.

Expands to a noexcept-specifier, a trailing return type and the function body, so that

auto make(A a, B b) KOKKOS_EXECUTION_RETURNS_BRACED((Pair<A, B>), a, b)
#define KOKKOS_EXECUTION_RETURNS_BRACED(_type_,...)
Define a function by returning a list-initialized object of an explicit type.
Definition macros.hpp:23

is equivalent to

auto make(A a, B b) noexcept(noexcept(Pair<A, B>{a, b})) -> Pair<A, B> {
return Pair<A, B>{a, b};
}
Note
Prefer STDEXEC_AUTO_RETURN whenever the return type can be deduced from the expression. Use this macro only when it cannot, that is, when the return type must be stated explicitly.

Definition at line 23 of file macros.hpp.