Algebraic-Programming / ALP

Home of ALP/GraphBLAS and ALP/Pregel, featuring shared- and distributed-memory auto-parallelisation of linear algebraic and vertex-centric programs. Soon with more to come!
Apache License 2.0
24 stars 4 forks source link

Add interleaved iterators to utils #280

Open anyzelman opened 7 months ago

anyzelman commented 7 months ago

InterleavedIterators wrap n input iterators and returns another iterator that iterates over the elements of each of the input iterators in an interleaved fashion. E.g., if there are two input iterators i and j that iterate over the following vectors:

i: {1,54,3,76,12,65 };
j: {243, 2, 76 };

then an interleaved iterator iterates over the following virtual vector: {1, 243, 54, 2, 3, 76, 76, 12, 65 };

anyzelman commented 7 months ago

Capturing TODOs from issue #233 :