Celeritas  0.5.0-86+4a8eea4
Classes | Functions
DeviceVector.hh File Reference
#include <type_traits>
#include "corecel/cont/InitializedValue.hh"
#include "corecel/cont/Span.hh"
#include "corecel/sys/ThreadId.hh"
#include "DeviceAllocation.hh"
#include "ObserverPtr.hh"
This graph shows which files directly or indirectly include this file:

Classes

class  celeritas::DeviceVector< T >
 Host vector for managing uninitialized device-storage data. More...
 

Functions

template<class T >
void celeritas::swap (DeviceVector< T > &a, DeviceVector< T > &b) noexcept
 Swap two vectors.
 
template<class T >
CELER_FUNCTION Span< T const > celeritas::make_span (DeviceVector< T > const &dv)
 Prevent accidental construction of Span from a device vector. More...
 
template<class T >
CELER_FUNCTION Span< T > celeritas::make_span (DeviceVector< T > &dv)
 Prevent accidental construction of Span from a device vector.
 
template<class T >
ObserverPtr< T, MemSpace::device > celeritas::make_observer (DeviceVector< T > &vec) noexcept
 Create an observer pointer from a device vector.
 
template<class T >
ObserverPtr< T const, MemSpace::device > celeritas::make_observer (DeviceVector< T > const &vec) noexcept
 Create an observer pointer from a pointer in the native memspace.
 

Function Documentation

◆ make_span()

template<class T >
CELER_FUNCTION Span<T const> celeritas::make_span ( DeviceVector< T > const &  dv)

Prevent accidental construction of Span from a device vector.

Use dv.device_ref() to get a span.