cuDDL
Loading...
Searching...
No Matches
device_span.cuh
Go to the documentation of this file.
1#pragma once
2
3#include <cuda/std/span>
4
5#include <cstddef>
6
7namespace cuddl {
8
19template <typename T>
20struct device_span : cuda::std::span<T> {
21 using cuda::std::span<T>::span;
22
28 template <typename U>
29 requires std::is_convertible_v<U (*)[], T (*)[]>
30 constexpr explicit device_span(device_span<U> other) noexcept
31 : cuda::std::span<T>(other.data(), other.size()) {}
32};
33
34} // namespace cuddl
Batch operations over contiguous device rows.
Definition a48.hpp:14
A span that is assumed to point to device-accessible memory.
constexpr device_span(device_span< U > other) noexcept
Implicit widening from device_span<U> where U* converts to T*.