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 <types.hpp>

Collaboration diagram for cuda::span< T >:
Collaboration graph
[legend]

Public Types

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

Public Member Functions

T * data () const noexcept
 
constexpr size_t size () const noexcept
 
T const * cbegin () const noexcept
 
T const * cend () const noexcept
 
T * begin () const noexcept
 
T * end () const noexcept
 

Public Attributes

T * data_
 
size_t size_
 

Detailed Description

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

A "poor man's" span class.

Todo:
: Replace this with a more proper span, possibly in a file of its own.
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: