Skip to main content

class buffer_access_map

Declaration

class buffer_access_map { /* full declaration omitted */ };

Member Variables

std::vector< std::pair<buffer_id, std::unique_ptr<range_mapper_base>>> m_accesses

Member Function Overview

Member Functions

void add_access(
    buffer_id bid,
    std::unique_ptr<range_mapper_base>&& rm)

Parameters

buffer_id bid
std::unique_ptr<range_mapper_base>&& rm

std::unordered_set<sycl::access::mode>
get_access_modes(buffer_id bid) const

Parameters

buffer_id bid

std::unordered_set<buffer_id>
get_accessed_buffers() const


region<3> get_mode_requirements(
    buffer_id bid,
    access_mode mode,
    int kernel_dims,
    const subrange<3>& sr,
    const range<3>& global_size) const

Description

Computes the combined access-region for a given buffer, mode and subrange.

Parameters

buffer_id bid
access_mode mode
int kernel_dims
const subrange<3>& sr
The subrange to be passed to the range mappers (extended to a chunk using the global size of the task)
const range<3>& global_size

Returns

The region obtained by merging the results of all range-mappers for this buffer and mode


std::pair<buffer_id, access_mode> get_nth_access(
    size_t n) const

Parameters

size_t n

size_t get_num_accesses() const


std::vector<const range_mapper_base*>
get_range_mappers(buffer_id bid) const

Parameters

buffer_id bid

box_vector<3> get_required_contiguous_boxes(
    buffer_id bid,
    int kernel_dims,
    const subrange<3>& sr,
    const range<3>& global_size) const

Parameters

buffer_id bid
int kernel_dims
const subrange<3>& sr
const range<3>& global_size

box<3> get_requirements_for_nth_access(
    size_t n,
    int kernel_dims,
    const subrange<3>& sr,
    const range<3>& global_size) const

Parameters

size_t n
int kernel_dims
const subrange<3>& sr
const range<3>& global_size