Skip to main content

class local_accessor

Declaration

template <typename DataT, int Dims = 1>
class local_accessor { /* full declaration omitted */ };

Template Parameters

DataT
int Dims = 1

Member Variables

sycl_accessor m_sycl_acc
range<Dims> m_allocation_size
static const int sycl_dims = std::max(1, Dims)

Member Aliases

  • using const_reference = const DataT&;
  • using reference = DataT&;
  • using size_type = size_t;
  • using value_type = DataT;
  • using sycl_accessor = sycl::local_accessor<DataT, sycl_dims>;

Member Function Overview

  • byte_size() const noexcept → size_type
  • empty() const noexcept → bool
  • get_pointer() const noexcept → std::add_pointer_t<value_type>
  • get_range() const → range<Dims>
  • local_accessor(const range<Dims> & allocation_size, handler & cgh)
  • template <int D = Dims, typename = std::enable_if_t<D == 0>>
    local_accessor(handler & cgh)
  • local_accessor(const local_accessor<DataT, Dims> & other)
  • local_accessor()
  • max_size() const noexcept → size_type
  • template <int D = Dims, std::enable_if_t<D == 0, int> = 0>
    operator DataT &() const
  • template <int D = Dims>
    operator*() const → std::enable_if_t<D == 0, DataT &>
  • template <int D = Dims>
    operator->() const → std::enable_if_t<D == 0, DataT *>
  • operator=(local_accessor<DataT, Dims> &&) → local_accessor<DataT, Dims> &
  • operator=(const local_accessor<DataT, Dims> &) → local_accessor<DataT, Dims> &
  • template <int D = Dims, std::enable_if_t<D == 0, int> = 0>
    operator=(const DataT & other) const → const local_accessor<DataT, Dims> &
  • template <int D = Dims, std::enable_if_t<D == 0, int> = 0>
    operator=(DataT && other) const → const local_accessor<DataT, Dims> &
  • operator[](const id<Dims> & index) const → DataT &
  • template <int D = Dims, std::enable_if_t<(D > 0), int> = 0>
    operator[](size_t dim0) const → decltype(auto)
  • size() const noexcept → size_type
  • local_accessor(const range<Dims> & allocation_size) → explicit
  • sycl_allocation_size() const → sycl::range<sycl_dims>

Member Functions

size_type byte_size() const noexcept


bool empty() const noexcept


std::add_pointer_t<value_type> get_pointer()
    const noexcept


range<Dims> get_range() const


local_accessor(const range<Dims>& allocation_size,
               handler& cgh)

Parameters

const range<Dims>& allocation_size
handler& cgh

template <int D = Dims,
          typename = std::enable_if_t<D == 0>>
local_accessor(handler& cgh)

Template Parameters

int D = Dims
= std::enable_if_t<D == 0>

Parameters

handler& cgh

local_accessor(
    const local_accessor<DataT, Dims>& other)

Parameters

const local_accessor<DataT, Dims>& other

local_accessor()


size_type max_size() const noexcept


template <int D = Dims,
          std::enable_if_t<D == 0, int> = 0>
operator DataT&() const

Template Parameters

int D = Dims
std::enable_if_t<D == 0, int> = 0

template <int D = Dims>
std::enable_if_t<D == 0, DataT&> operator*() const

Template Parameters

int D = Dims

template <int D = Dims>
std::enable_if_t<D == 0, DataT*> operator->()
    const

Template Parameters

int D = Dims

local_accessor<DataT, Dims>& operator=(
    local_accessor<DataT, Dims>&&)

Parameters

local_accessor<DataT, Dims>&&

local_accessor<DataT, Dims>& operator=(
    const local_accessor<DataT, Dims>&)

Parameters

const local_accessor<DataT, Dims>&

template <int D = Dims,
          std::enable_if_t<D == 0, int> = 0>
const local_accessor<DataT, Dims>& operator=(
    const DataT& other) const

Template Parameters

int D = Dims
std::enable_if_t<D == 0, int> = 0

Parameters

const DataT& other

template <int D = Dims,
          std::enable_if_t<D == 0, int> = 0>
const local_accessor<DataT, Dims>& operator=(
    DataT&& other) const

Template Parameters

int D = Dims
std::enable_if_t<D == 0, int> = 0

Parameters

DataT&& other

inline DataT& operator[](
    const id<Dims>& index) const

Parameters

const id<Dims>& index

template <int D = Dims,
          std::enable_if_t<(D > 0), int> = 0>
inline decltype(auto) operator[](
    size_t dim0) const

Template Parameters

int D = Dims
std::enable_if_t<(D > 0), int> = 0

Parameters

size_t dim0

size_type size() const noexcept


explicit local_accessor(
    const range<Dims>& allocation_size)

Parameters

const range<Dims>& allocation_size

sycl::range<sycl_dims> sycl_allocation_size()
    const