BankedMemoryLayout class

Compile-time geometry for a flat address space partitioned into banks.

Uneven capacities are supported by assigning one extra entry to the first banks. A layout may be applied recursively to a bank-local row space to describe tiles without changing the flat external identity domain.

Constructors

BankedMemoryLayout({required int entryCount, required int bankCount, MemoryBankingPolicy policy = MemoryBankingPolicy.interleaved})
Creates a validated bank geometry.

Properties

bankCount → int
Number of independently addressable banks.
final
entryCount → int
Number of flat addressable entries.
final
hashCode → int
The hash code for this object.
no setterinherited
policy → MemoryBankingPolicy
Flat-to-bank mapping policy.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

bankEntryCount(int bank) → int
Number of local rows in bank.
coordinateOf(int index) → BankedMemoryCoordinate
Converts one flat index into a bank-local coordinate.
flatIndex({required int bank, required int row}) → int
Converts a bank and local row back into one flat index.
indicesInBank(int bank) → List<int>
Flat indices belonging to bank, in bank-local row order.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited