Mir vs. Numpy: Reworked!
9il
ilyayaroshenko at gmail.com
Sat Dec 5 07:44:33 UTC 2020
On Friday, 4 December 2020 at 02:35:49 UTC, data pulverizer wrote:
> On Thursday, 3 December 2020 at 21:28:04 UTC, jmh530 wrote:
>
> Am I correct in assuming that the data in the NDSlice is also a
> single array?
sweep_ndslice uses (2*N - 1) arrays to index U, this allows LDC
to unroll the loop.
For example, for 2D case, withNeighboursSum [2] will store the
pointer to the result, and the pointer at rows above and below.
matrix:
--------------
------a------- above iterator
------r------- the result
------b------- below iterator
--------------
Also, for AVX-512 targets it allows vectorizing the loop [1]. The
benchmark has been run on the AVX2 CPU.
[1] https://github.com/typohnebild/numpy-vs-mir/issues/4
[2]
http://mir-algorithm.libmir.org/mir_ndslice_topology.html#.withNeighboursSum
More information about the Digitalmars-d-announce
mailing list