| Home | Libraries | People | FAQ | More

## Class template svm_ptr

boost::compute::svm_ptr

## Synopsis

    // 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;
    };

## Description

### `svm_ptr` public construct/copy/destruct

1.     svm_ptr();

2.     svm_ptr(void * ptr, const context & context);

3.     svm_ptr(const svm_ptr< T > & other);

4.     svm_ptr< T > & operator=(const svm_ptr< T > & other);

5.     ~svm_ptr();

### `svm_ptr` public member functions

1.     void * get() const;

2.     svm_ptr< T > operator+(difference_type n);

3.     difference_type operator-(svm_ptr< T > other);

4.     const context & get_context() const;

5.     bool operator==(const svm_ptr< T > & other) const;

6.     bool operator!=(const svm_ptr< T > & other) const;