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::queue::fence.

Declared at: include/fence.h:30

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()

Declared at: include/fence.h:32


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

Declared at: include/fence.h:34

Parameters

buffer_snapshot<T, Dims>&& other

const T* get_data() const

Declared at: include/fence.h:47


id<Dims> get_offset() const

Declared at: include/fence.h:41


range<Dims> get_range() const

Declared at: include/fence.h:43


subrange<Dims> get_subrange() const

Declared at: include/fence.h:45


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

Declared at: include/fence.h:57

Template Parameters

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

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

Declared at: include/fence.h:36

Parameters

buffer_snapshot<T, Dims>&& other

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

Declared at: include/fence.h:49

Parameters

id<Dims> index

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

Declared at: include/fence.h:52

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)

Declared at: include/fence.h:68

Parameters

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