slotFor method

int slotFor(
  1. int set,
  2. int way
)

Returns the flattened sidecar index for set and way.

Implementation

int slotFor(int set, int way) {
  if (set < 0 || set >= setCount || way < 0 || way >= wayCount) {
    throw RangeError('Set and way must be within the configured geometry.');
  }
  return set * wayCount + way;
}