Skip to main content

class even_split

Declaration

template <int BufferDims>
class even_split { /* full declaration omitted */ };

Description

For a 1D kernel, splits an nD-buffer evenly along its slowest dimension. This range mapper is unique in the sense that the chunk parameter (i.e. the iteration space) is unrelated to the buffer indices it maps to. It is designed to distribute a buffer in contiguous portions between nodes for collective host tasks, allowing each node to output its portion in I/O operations. See accessor::get_allocation_window on how to access the resulting host memory.

Template Parameters

int BufferDims

Member Variables

range<BufferDims> m_granularity = detail::range_cast<BufferDims>(celerity::range<3>(1, 1, 1))

Member Function Overview

  • even_split()
  • even_split(const range<BufferDims> & granularity) → explicit
  • operator()(const chunk<1> & chunk, const range<BufferDims> & buffer_size) const → subrange<BufferDims>

Member Functions

even_split()


explicit even_split(
    const range<BufferDims>& granularity)

Parameters

const range<BufferDims>& granularity

subrange<BufferDims> operator()(
    const chunk<1>& chunk,
    const range<BufferDims>& buffer_size) const

Parameters

const chunk<1>& chunk
const range<BufferDims>& buffer_size