|
template<typename C , std::enable_if_t< is_device_span_supported_container< C >::value &&std::is_convertible_v< std::remove_pointer_t< decltype(thrust::raw_pointer_cast(std::declval< C & >().data()))>(*)[], T(*)[]> , * = nullptr> |
constexpr | device_span (C &in) |
|
template<typename C , std::enable_if_t< is_device_span_supported_container< C >::value &&std::is_convertible_v< std::remove_pointer_t< decltype(thrust::raw_pointer_cast(std::declval< C & >().data()))>(*)[], T(*)[]> , * = nullptr> |
constexpr | device_span (C const &in) |
|
template<typename OtherT , std::size_t OtherExtent, std::enable_if_t<(Extent==OtherExtent||Extent==dynamic_extent) &&std::is_convertible_v< OtherT(*)[], T(*)[]>, void > * = nullptr> |
constexpr CUDF_HOST_DEVICE | device_span (device_span< OtherT, OtherExtent > const &other) noexcept |
|
constexpr base::reference | operator[] (typename base::size_type idx) const |
| 返回序列中第 idx 个元素的引用。 更多信息...
|
|
constexpr base::reference | front () const |
| 返回 span 中的第一个元素的引用。 更多信息...
|
|
constexpr base::reference | back () const |
| 返回 span 中的最后一个元素的引用。 更多信息...
|
|
constexpr CUDF_HOST_DEVICE device_span | subspan (typename base::size_type offset, typename base::size_type count) const noexcept |
| 获取一个 span,它是从此 span 中从 offset 开始的 count 个元素的视图。 更多信息...
|
|
constexpr CUDF_HOST_DEVICE | span_base (pointer data, size_type size) |
| 从指针和大小构造 span。 更多信息...
|
|
constexpr CUDF_HOST_DEVICE | span_base (span_base const &) noexcept=default |
| 复制构造函数。
|
|
constexpr CUDF_HOST_DEVICE span_base & | operator= (span_base const &) noexcept=default |
| 复制赋值运算符。 更多信息...
|
|
constexpr CUDF_HOST_DEVICE iterator | begin () const noexcept |
| 返回指向 span 第一个元素的迭代器。 更多信息...
|
|
constexpr CUDF_HOST_DEVICE iterator | end () const noexcept |
| 返回指向 span 最后一个元素之后位置的迭代器。 更多信息...
|
|
constexpr CUDF_HOST_DEVICE pointer | data () const noexcept |
| 返回指向序列开头的指针。 更多信息...
|
|
constexpr CUDF_HOST_DEVICE size_type | size () const noexcept |
| 返回 span 中的元素数量。 更多信息...
|
|
constexpr CUDF_HOST_DEVICE size_type | size_bytes () const noexcept |
| 返回序列的大小(以字节为单位)。 更多信息...
|
|
constexpr CUDF_HOST_DEVICE bool | empty () const noexcept |
| 检查 span 是否为空。 更多信息...
|
|
constexpr device_span< T, cudf::dynamic_extent > | first (size_type count) const noexcept |
| 获取一个由序列的前 N 个元素组成的子 span。 更多信息...
|
|
constexpr device_span< T, cudf::dynamic_extent > | last (size_type count) const noexcept |
| 获取一个由序列的后 N 个元素组成的子 span。 更多信息...
|
|