4 ms·
> linear-time But... there are two nested `range(n)` for loops. Typo?
by Snild 5y ago
> linear-time
But... there are two nested `range(n)` for loops. Typo?
- boothby 5y agoThat's the serial implementation, which is clearly O(n^2). The systolic algorithm runs in linear time on specialty hardware (similar to a tensor core, which can do comparisons in a square matrix, and can perform row-sums). Or, if we ignore communication overheads, it can run in O(n) time with O(n) parallel workers.