docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
bank_conflicts.h File Reference
#include <cstddef>
#include <functional>
#include <optional>
#include <vector>
#include "sdfg/data_flow/library_node.h"
#include "sdfg/tiles/buffer_layout.h"

Go to the source code of this file.

Classes

struct  sdfg::tiles::BankModel
 A banked on-chip memory: banks banks of bank_bytes each, every bank serving one word per cycle. More...

Namespaces

namespace  sdfg
namespace  sdfg::tiles

Functions

size_t sdfg::tiles::access_cycles (const BankModel &model, size_t elem_bytes, const std::vector< int64_t > &strides, const data_flow::SubgroupAccess &access)
 Cycles the banked memory spends serving access when the operand's elements (of elem_bytes) sit at element offset sum(coord[d] * strides[d]).
size_t sdfg::tiles::slot_pad (const BankModel &model, size_t block, size_t coop_span)
 ConflictPolicy::PadSlot padding (elements) of a per-slot block of block elements whose slots are accessed by coop_span consecutive lanes of a subgroup: makes the slot stride congruent to coop_span modulo the bank count, rounded up to a multiple of 4 elements so blocks stay vector-addressable.
size_t sdfg::tiles::row_pad (const BankModel &model, size_t elem_bytes, PackedBuffer buffer, size_t align_bytes, const std::function< std::optional< size_t >(const PackedBuffer &)> &cost)
 The ConflictPolicy::PadRow padding (elements) of buffer minimizing cost, the access cycles of a candidate (nullopt rejects it).