cuda-api-wrappers
Thin C++-flavored wrappers for the CUDA Runtime API
Public Types | Public Member Functions | Public Attributes | List of all members
cuda::span< T > Struct Template Reference

A "poor man's" span class. More...

#include <span.hpp>

Public Types

using value_type = T
 
using element_type = T
 
using size_type = ::std::size_t
 
using difference_type = ::std::ptrdiff_t
 
using pointer = T *
 
using const_pointer = T const *
 
using reference = T &
 
using const_reference = const T &
 

Public Member Functions

pointer data () const noexcept
 
size_type size () const noexcept
 
pointer begin () const noexcept
 
pointer end () const noexcept
 
reference operator[] (size_type idx) const noexcept
 
template<typename U = value_type, typename = typename ::std::enable_if<! ::std::is_const<U>::value>::type>
 operator span< const U > ()
 

Public Attributes

pointer data_
 
size_type size_
 

Detailed Description

template<typename T>
struct cuda::span< T >

A "poor man's" span class.

Todo:
: Replace this with a more proper implementation.
Note
Remember a span is a reference type. That means that changes to the pointed-to data are _not_considered changes to the span, hence you can get to that data with const methods.

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