Extended CUDA Library (ecuda)
2.0
|
#include <memory.hpp>
Public Types | |
typedef bool | result_type |
typedef shared_ptr< T > | first_argument_type |
typedef shared_ptr< T > | second_argument_type |
Public Member Functions | |
__HOST__ __DEVICE__ bool | operator() (const shared_ptr< T > &lhs, const shared_ptr< T > &rhs) const |
Compares lhs and rhs using owner-based semantics. More... | |
This function object provides owner-based (as opposed to value-based) mixed-type ordering of ecuda::shared_ptr. The order is such that two smart pointers compare equivalent only if they are both empty or if they both manage the same object, even if the values of the raw pointers obtained by get() are different (e.g. because they point at different subobjects within the same object).
This class template is the preferred comparison predicate when building associative containers with ecuda::shared_ptr as keys, that is: std::map< ecuda::shared_ptr<T>, U, ecuda::owner_less<ecuda::shared_ptr<T> > >.
Definition at line 115 of file memory.hpp.
typedef shared_ptr<T> ecuda::owner_less< shared_ptr< T > >::first_argument_type |
Definition at line 118 of file memory.hpp.
typedef bool ecuda::owner_less< shared_ptr< T > >::result_type |
Definition at line 117 of file memory.hpp.
typedef shared_ptr<T> ecuda::owner_less< shared_ptr< T > >::second_argument_type |
Definition at line 119 of file memory.hpp.
|
inline |
Compares lhs and rhs using owner-based semantics.
lhs,rhs | shared-ownership pointers to compare |
Definition at line 126 of file memory.hpp.