...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::compute::svm_ptr
// In header: <boost/compute/memory/svm_ptr.hpp> template<typename T> class svm_ptr { public: // types typedef T value_type; typedef std::ptrdiff_t difference_type; typedef T * pointer; typedef T & reference; typedef std::random_access_iterator_tag iterator_category; // construct/copy/destruct svm_ptr(); svm_ptr(void *, const context &); svm_ptr(const svm_ptr< T > &); svm_ptr< T > & operator=(const svm_ptr< T > &); ~svm_ptr(); // public member functions void * get() const; svm_ptr< T > operator+(difference_type); difference_type operator-(svm_ptr< T >); const context & get_context() const; bool operator==(const svm_ptr< T > &) const; bool operator!=(const svm_ptr< T > &) const; };