Skip to content

PMacc data types [Buffer]

René Widera edited this page Jul 23, 2014 · 11 revisions

You are here: Home > Developer Documentation


This page give an overview of the most impotent data types in PMacc.

Naming

Buffer = is a container that point or holds memory

array based buffers

  • Buffers are located in libPMacc/include/memory/buffers
  • Buffers can be container of real memory those are located on an accelerator/host or container those were a combination real memory buffers.

buffers with real memory

In the most cases this buffer types are a combination of [memory location]Buffer (the interface), Buffer (generic interface) and [memory location]BufferIntern (implementation).

  • DeviceBuffer/ DeviceBufferIntern
    • contains device memory
    • memory is set to zero on initialization
    • line by line aligned (if multi dimensional)
    • number of elements (current size) is available on device (optional)
    • can point to existing device memory (optional)
  • HostBuffer/ HostBufferIntern
    • contains host memory
    • memory is set to zero on initialization
    • also multi dimensional memory is not aligned
  • Exchange/ExchangeIntern
    • buffer for communicate guarding cells (ghost cells)
    • contains host buffer
    • point to a subset of existing device buffer (host and device size are the same)
    • linear device double buffer of subset were the device buffer points to (only existing on multi dimensional exchanges) [ used to speed up memory copies from host2device and device2host ]
  • MappedBuffer
    • contains host buffer those can directly accessed from device
    • memory is set to zero on initialization
    • same interface like DeviceBuffer
    • not aligned

combined Buffer

  • GridBuffer
    • complex buffer those contains DeviceBuffer, HostBuffer
    • ExchangeBuffer can be added at runtime for every side of the memory (1D -- <=2 exchanges, 2D -- <= 8 exchanges, 3D -- <=26 exchanges)
    • contains methods for asynchronous communication of the exchanges
  • MultiGridBuffer
    • create multiple GridBuffer of the same native data type and size in one big memory chunk
    • every GridBuffer can accessed by a enum
    • exchanges can be set separate for on GridBuffer or for all
    • the used iterator MultiBox has a small memory footprint in contrast to multiple GridBuffers

Clone this wiki locally