|
Celeritas 0.7+c0d26b9
|
Classes | |
| struct | celeritas::LdgMember< Class, T > |
Storable projector that loads a struct member via ldg . More... | |
Functions | |
| template<class T > | |
| constexpr std::enable_if_t< std::is_arithmetic_v< T >, T const * > | celeritas::ldg_data (T const *ptr) noexcept |
Get a pointer to the arithmetic data for use with __ldg . | |
| template<class T > | |
| constexpr std::enable_if_t< std::is_enum_v< T >, std::underlying_type_t< T > const * > | celeritas::ldg_data (T const *ptr) noexcept |
| Get a pointer to the underlying integer for an enum type. | |
| template<class T > | |
| constexpr T | celeritas::ldg (T const *ptr) |
| Wrap the low-level CUDA/HIP "load read-only global memory" function. | |
| template<class Class , class T > | |
| T | celeritas::ldg (Class const &obj, T Class::*mp) |
Load a struct member via ldg using a pointer-to-member. | |
| template<class Class , class T > | |
| celeritas::LdgMember (T Class::*) -> LdgMember< Class, T > | |
Deduction guide: LdgMember{&Foo::bar} deduces LdgMember<Foo,Bar> | |
Load a struct member via ldg using a pointer-to-member.
Convenience overload for when the member is known at the call site.
Wrap the low-level CUDA/HIP "load read-only global memory" function.
This relies on ldg_data found by ADL to obtain a pointer to the underlying arithmetic type; see Cached device loading for usage and extension examples.
On CUDA the load is cached in L1/texture memory, improving performance when data is repeatedly read by many threads in a kernel.