Commit ffb03cbf authored by Frederik Hennig's avatar Frederik Hennig
Browse files

fix to BlockIndexing

parent 354fede8
Pipeline #40391 passed with stages
in 13 minutes and 11 seconds
......@@ -147,7 +147,8 @@ class BlockIndexing(AbstractIndexing):
for i in range(len(widths)):
factor = div_floor(prod(block_size[:i]), prod(adapted_block_size))
adapted_block_size.append(sp.Min(block_size[i] * factor, widths[i]))
block_size = tuple(adapted_block_size) + extend_bs
extend_adapted_bs = (1,) * (3 - len(adapted_block_size))
block_size = tuple(adapted_block_size) + extend_adapted_bs
block_size = tuple(sp.Min(bs, max_bs) for bs, max_bs in zip(block_size, self._maximum_block_size))
grid = tuple(div_ceil(length, block_size) for length, block_size in zip(widths, block_size))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment