weightAt method

double weightAt(
  1. int r,
  2. int c
)

The weight the kernels use at (r, c); for tests.

Implementation

double weightAt(int r, int c) {
  final group = format.groupColumns;
  final g = c ~/ group;
  final p = (c % group) ~/ 4;
  final l = c % 4;
  final word = _words[(r * groupsPerRow + g) * 4 + l];
  final u = (word >> (format.bits * p)) & ((1 << format.bits) - 1);
  return (u - format.offset) *
      _scales[r * blocksPerRow + c ~/ format.blockColumns];
}