Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
kernel_call.hpp File Reference
Include dependency graph for kernel_call.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  sham::details::kernel_gen_args< index_t, RefIn, RefOut >
 helper type to get the arguments types of the kernel generator More...
struct  sham::details::tuple_to_signature< std::tuple< Ts... > >
struct  sham::details::expected_kernel_signature< Ret(Ts...)>
struct  sham::details::is_kernel_invocable< F, expected_kernel_signature< Ret(Ts...)> >
struct  sham::details::expected_kernel_fn_type< expected_kernel_signature< Ret(Ts...)> >

Namespaces

namespace  sham
 namespace for backends this one is named only sham since shambackends is too long to write

Concepts

concept  sham::details::kernel_invocable

Typedefs

template<class index_t, class RefIn, class RefOut>
using sham::details::kernel_expected_signature
 The expected signature of the kernel generator.

Functions

template<class index_t, class RefIn, class RefOut, class Functor>
void sham::details::typed_index_kernel_call_lambda (sham::DeviceQueue &q, RefIn in, RefOut in_out, index_t n, Functor &&kernel_gen, SourceLocation &&callsite=SourceLocation{})
 internal implementation of typed_index_kernel_call
template<class index_t, class RefIn, class RefOut, class Functor>
void sham::details::typed_index_kernel_call (sham::DeviceQueue &q, RefIn in, RefOut in_out, index_t n, Functor &&func, SourceLocation &&callsite=SourceLocation{})
template<class RefIn, class RefOut, class Functor>
void sham::kernel_call (sham::DeviceQueue &q, RefIn in, RefOut in_out, u32 n, Functor &&func, SourceLocation &&callsite=SourceLocation{})
 Submit a kernel to a SYCL queue.
template<class RefIn, class RefOut, class Functor>
void sham::kernel_call_u64 (sham::DeviceQueue &q, RefIn in, RefOut in_out, u64 n, Functor &&func, SourceLocation &&callsite=SourceLocation{})
 u64 indexed variant of kernel_call
template<class RefIn, class RefOut, class Functor>
void sham::kernel_call_hndl (sham::DeviceQueue &q, RefIn in, RefOut in_out, u32 n, Functor &&kernel_gen, SourceLocation &&callsite=SourceLocation{})
template<class RefIn, class RefOut, class Functor>
void sham::kernel_call_hndl_u64 (sham::DeviceQueue &q, RefIn in, RefOut in_out, u64 n, Functor &&kernel_gen, SourceLocation &&callsite=SourceLocation{})
 u64 indexed variant of kernel_call_hndl

Variables

template<class ExpectedFnSignature>
constexpr bool sham::details::matches_expected_kernel_signature = false
 Always-false flag parameterized by the expected function type (shown in static_assert).

Detailed Description

Author
Timothée David–Cléris (tim.s.nosp@m.hamr.nosp@m.ock@p.nosp@m.roto.nosp@m.n.me)

Definition in file kernel_call.hpp.

Typedef Documentation

◆ kernel_expected_signature

template<class index_t, class RefIn, class RefOut>
using sham::details::kernel_expected_signature
Initial value:
typename kernel_gen_args<index_t, RefIn, RefOut>::args_types>::type>
Trick to name the error message if we want to use it.
Helper to extract the function signature from a tuple of types.

The expected signature of the kernel generator.

Definition at line 107 of file kernel_call.hpp.

Function Documentation

◆ typed_index_kernel_call()

template<class index_t, class RefIn, class RefOut, class Functor>
void sham::details::typed_index_kernel_call ( sham::DeviceQueue & q,
RefIn in,
RefOut in_out,
index_t n,
Functor && func,
SourceLocation && callsite = SourceLocation{} )

internal implementation of typed_index_kernel_call

Signature mismatches are reported with a single static_assert that embeds the raw expected function type. The body is gated by if constexpr so a bad functor does not cascade into further template errors.

Definition at line 144 of file kernel_call.hpp.

◆ typed_index_kernel_call_lambda()

template<class index_t, class RefIn, class RefOut, class Functor>
void sham::details::typed_index_kernel_call_lambda ( sham::DeviceQueue & q,
RefIn in,
RefOut in_out,
index_t n,
Functor && kernel_gen,
SourceLocation && callsite = SourceLocation{} )

internal implementation of typed_index_kernel_call

Definition at line 34 of file kernel_call.hpp.

Variable Documentation

◆ matches_expected_kernel_signature

template<class ExpectedFnSignature>
bool sham::details::matches_expected_kernel_signature = false
inlineconstexpr

Always-false flag parameterized by the expected function type (shown in static_assert).

Definition at line 136 of file kernel_call.hpp.