Celeritas 0.7+cf8d83d
Loading...
Searching...
No Matches
Classes | Functions
ObserverPtr.hh File Reference
#include <type_traits>
#include "corecel/Macros.hh"
#include "corecel/Types.hh"
#include "corecel/math/Algorithms.hh"

Classes

class  celeritas::ObserverPtr< T, M >
 Type-safe non-owning pointer. More...
 

Macros

Comparators
#define CELER_DEFINE_OBSPTR_CMP(TOKEN)
 

Functions

template<class T >
 celeritas::ObserverPtr (T *) -> ObserverPtr< T >
 
template<class T , MemSpace M>
constexpr void celeritas::swap (ObserverPtr< T, M > &lhs, ObserverPtr< T, M > &rhs) noexcept
 Swap two pointers.
 
template<class T >
ObserverPtr< Tceleritas::make_observer (T *ptr) noexcept
 Create an observer pointer from a pointer in the native memspace.
 

Macro Definition Documentation

◆ CELER_DEFINE_OBSPTR_CMP

#define CELER_DEFINE_OBSPTR_CMP (   TOKEN)
Value:
template<class T2> \
CELER_CONSTEXPR_FUNCTION friend bool operator TOKEN( \
ObserverPtr lhs, ObserverPtr<T2, M> rhs) noexcept \
{ \
return lhs.get() TOKEN rhs.get(); \
}
#define CELER_CONSTEXPR_FUNCTION
Decorate a function that works on both host and device, with and without NVCC, can be evaluated at co...
Definition Macros.hh:82