cuSBF
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 cusbf {
8
20template <typename T>
21struct device_span : cuda::std::span<T> {
22 using cuda::std::span<T>::span;
23
29 template <typename U>
30 requires std::is_convertible_v<U (*)[], T (*)[]>
31 constexpr explicit device_span(device_span<U> other) noexcept
32 : cuda::std::span<T>(other.data(), other.size()) {}
33};
34
35} // namespace cusbf
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*.