Skip to main content

class buffer_snapshot

Declaration

template <typename T, int Dims>
class buffer_snapshot { /* full declaration omitted */ };

Description

Owned representation of buffer contents as captured by celerity::distr_queue::fence.

Template Parameters

T
int Dims

Member Variables

subrange<Dims> m_subrange
std::unique_ptr<T[]> m_data

Member Function Overview

  • buffer_snapshot()
  • buffer_snapshot(buffer_snapshot<T, Dims> && other) noexcept
  • get_data() const → const T *
  • get_offset() const → id<Dims>
  • get_range() const → range<Dims>
  • get_subrange() const → subrange<Dims>
  • template <int D = Dims, std::enable_if_t<D == 0, int> = 0>
    operator*() const → const T &
  • operator=(buffer_snapshot<T, Dims> && other) noexcept → buffer_snapshot<T, Dims> &
  • operator[](id<Dims> index) const → const T &
  • template <int D = Dims, std::enable_if_t<(D > 0), int> = 0>
    operator[](size_t index) const → decltype(auto)
  • buffer_snapshot(subrange<Dims> sr, std::unique_ptr<T[]> data) → explicit

Member Functions

buffer_snapshot()


buffer_snapshot(
    buffer_snapshot<T, Dims>&& other) noexcept

Parameters

buffer_snapshot<T, Dims>&& other

const T* get_data() const


id<Dims> get_offset() const


range<Dims> get_range() const


subrange<Dims> get_subrange() const


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

Template Parameters

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

buffer_snapshot<T, Dims>& operator=(
    buffer_snapshot<T, Dims>&& other) noexcept

Parameters

buffer_snapshot<T, Dims>&& other

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

Parameters

id<Dims> index

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

Template Parameters

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

Parameters

size_t index

explicit buffer_snapshot(
    subrange<Dims> sr,
    std::unique_ptr<T[]> data)

Parameters

subrange<Dims> sr
std::unique_ptr<T[]> data