cuSBF
Loading...
Searching...
No Matches
Public Member Functions | List of all members
cusbf::device_span< T > Struct Template Reference

A span that is assumed to point to device-accessible memory. More...

Inheritance diagram for cusbf::device_span< T >:
[legend]
Collaboration diagram for cusbf::device_span< T >:
[legend]

Public Member Functions

template<typename U >
requires std::is_convertible_v<U (*)[], T (*)[]>
constexpr device_span (device_span< U > other) noexcept
 Implicit widening from device_span<U> where U* converts to T* (e.g.
 

Detailed Description

template<typename T>
struct cusbf::device_span< T >

A span that is assumed to point to device-accessible memory.

Layout-identical to cuda::std::span<T> so it can be passed to kernels by value.

The distinct type prevents accidentally mixing host and device pointers at compile time.

Definition at line 19 of file device_span.cuh.

Constructor & Destructor Documentation

◆ device_span()

template<typename T >
template<typename U >
requires std::is_convertible_v<U (*)[], T (*)[]>
constexpr cusbf::device_span< T >::device_span ( device_span< U >  other)
inlineexplicitconstexprnoexcept

Implicit widening from device_span<U> where U* converts to T* (e.g.

device_span<int> to device_span<const int>).

Definition at line 26 of file device_span.cuh.

27 : cuda::std::span<T>(other.data(), other.size()) {
28 }

The documentation for this struct was generated from the following file: