Multipointer

sycl::access::address_space

enum class address_space : int {
    global_space,
    local_space,
    constant_space,
    private_space
};

See also

SYCL Specification Section 4.7.7

sycl::multi_ptr

template <typename ElementType, sycl::access::address_space Space> class multi_ptr;

template <sycl::access::address_space Space> class multi_ptr<VoidType, Space>;

Template parameters

ElementType

Space

Member types

element_type

difference_type

pointer_t

const_pointer_t

reference_t

const_reference_t

Nonmember data

address_space

See also

SYCL Specification Section 4.7.7.1

(constructors)

multi_ptr();
multi_ptr(const sycl::multi_ptr&);
multi_ptr(sycl::multi_ptr&&);
multi_ptr(pointer_t);
multi_ptr(ElementType*);
multi_ptr(std::nullptr_t);

operator=

sycl::multi_ptr &operator=(const multi_ptr&);
sycl::multi_ptr &operator=(multi_ptr&&);
sycl::multi_ptr &operator=(pointer_t);
sycl::multi_ptr &operator=(ElementType*);
sycl::multi_ptr &operator=(std::nullptr_t);


Available only when:
 Space == global_space

template <int dimensions, access::mode Mode, access::placeholder isPlaceholder>
sycl::multi_ptr(accessor<ElementType, dimensions, Mode, sycl::access::target::global_buffer, isPlaceholder>);

Available only when:
 Space == local_space

template <int dimensions, access::mode Mode, access::placeholder isPlaceholder>
sycl::multi_ptr(accessor<ElementType, dimensions, Mode, sycl::access::target::local, isPlaceholder>);

Available only when:
 Space == constant_space

template <int dimensions, access::mode Mode, access::placeholder isPlaceholder>
sycl::multi_ptr(accessor<ElementType, dimensions, Mode, sycl::access::target::constant_buffer, isPlaceholder>);

Template parameters

dimensions

Mode

isPlaceholder

operator*

friend ElementType& operator*(const sycl::multi_ptr& mp);

operator->

ElementType* operator->() const;

get

pointer_t get() const;

Returns

Returns the underlying OpenCL C pointer

(Implicit conversions)

Implicit conversion to the underlying pointer type

operator ElementType*() const;

Implicit conversion to a multi_ptr<void>.  Only available
 when ElementType is not const-qualified

operator sycl::multi_ptr<void, Space>() const;

Implicit conversion to a multi_ptr<const void>. Only
 available when ElementType is const-qualified

operator sycl::multi_ptr<const void, Space>() const;

Implicit conversion to multi_ptr<const ElementType, Space>

operator sycl::multi_ptr<const ElementType, Space>() const;

(Arithmetic operators)

friend sycl::multi_ptr& operator++(sycl::multi_ptr& mp);
friend sycl::multi_ptr operator++(sycl::multi_ptr& mp, int);
friend sycl::multi_ptr& operator--(sycl::multi_ptr& mp);
friend sycl::multi_ptr operator--(sycl::multi_ptr& mp, int);
friend sycl::multi_ptr& operator+=(sycl::multi_ptr& lhs, difference_type r);
friend sycl::multi_ptr& operator-=(sycl::multi_ptr& lhs, difference_type r);
friend sycl::multi_ptr operator+(const sycl::multi_ptr& lhs, difference_type r);
friend sycl::multi_ptr operator-(const sycl::multi_ptr& lhs, difference_type r);

prefetch

void prefetch(size_t numElements) const;

(Relational operators)

friend bool operator==(const sycl::multi_ptr& lhs, const sycl::multi_ptr& rhs);
friend bool operator!=(const sycl::multi_ptr& lhs, const sycl::multi_ptr& rhs);
friend bool operator<(const sycl::multi_ptr& lhs, const sycl::multi_ptr& rhs);
friend bool operator>(const sycl::multi_ptr& lhs, const sycl::multi_ptr& rhs);
friend bool operator<=(const sycl::multi_ptr& lhs, const sycl::multi_ptr& rhs);
friend bool operator>=(const sycl::multi_ptr& lhs, const sycl::multi_ptr& rhs);

friend bool operator==(const sycl::multi_ptr& lhs, std::nullptr_t);
friend bool operator!=(const sycl::multi_ptr& lhs, std::nullptr_t);
friend bool operator<(const sycl::multi_ptr& lhs, std::nullptr_t);
friend bool operator>(const sycl::multi_ptr& lhs, std::nullptr_t);
friend bool operator<=(const sycl::multi_ptr& lhs, std::nullptr_t);
friend bool operator>=(const sycl::multi_ptr& lhs, std::nullptr_t);

friend bool operator==(std::nullptr_t, const sycl::multi_ptr& rhs);
friend bool operator!=(std::nullptr_t, const sycl::multi_ptr& rhs);
friend bool operator<(std::nullptr_t, const sycl::multi_ptr& rhs);
friend bool operator>(std::nullptr_t, const sycl::multi_ptr& rhs);
friend bool operator<=(std::nullptr_t, const sycl::multi_ptr& rhs);
friend bool operator>=(std::nullptr_t, const sycl::multi_ptr& rhs);