Topic: Execution Policy Decorators + Interleaving Range for N3554


Author: Ami Tavory <atavory@gmail.com>
Date: Sat, 26 Sep 2015 01:47:38 +0300
Raw View
--001a113ff3c476641505209a229b
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

  Hello,

  N3554
<https://www.google.co.il/url?sa=3Dt&rct=3Dj&q=3D&esrc=3Ds&source=3Dweb&cd=
=3D1&cad=3Drja&uact=3D8&ved=3D0CBsQFjAAahUKEwiZ4r7qnJPIAhXDSBQKHQCCDpk&url=
=3Dhttp%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F201=
3%2Fn3554.pdf&usg=3DAFQjCNFgqgAuP5_8RBufJcRmTc0jiuxOLA&sig2=3DABrAEKRd1TJ93=
ZGyovx_rQ&bvm=3Dbv.103627116,d.bGg>
proposes
execution-policy types for algorithms, which is a very beneficial &
exciting step. I'd like to suggest
<http://autumn_interleaved.bitbucket.org/> the addition of
template-decorators for these basic types, as well as a specialized
degenerate "container" for parallel interleaving between algorithms in a
pipeline. While this is useful for mainly a specific field - data
processing - IMHO it is very useful within it.
  Data processing often takes the form of a conceptual pipeline of
functional-style steps operating on ranges. E.g., given a vector of file
names, one might transform it into a vector of matrices (by reading &
manipulating the content of each file corresponding to a file name), and
average the matrices in the latter vector. The pipeline stages often
exhibit huge variation in the ranges' elements' size (e.g., a vector of
file names is small, but a vector of resulting matrices might be huge) - to
the point that some stages cannot fit at once in main memory. The pipelines
often can benefit, or actually require (due to the previous point), that
some stages begin before previous ones have entirely terminated.

  While N3554's focus is primarily parallel versions of the sequential
algorithms in the standard library, I believe parallelism opens many
questions which were irrelevant or unimportant in sequential execution:
1. Is the request to operate on all elements concurrently synonymous with a
permission for all resulting objects to exist concurrently?
2. What is the chunking size that will work best for a particular range and
operation? My simulations show that this is both crucial and non-uniform
across different types and operations.
3. Is the request to operate on all elements concurrently still constrained
by the results being aggregated according to the original order? (This
question was a non-issue in a sequential setting.)
4. What should be the execution relation between two invocations of
algorithms on ranges, when the output of one is the input of another?
  These are the points I tried to address in an augmentation proposal to
N3554 <http://autumn_interleaved.bitbucket.org/>. I look forward to
feedback on it, and hope to generate further interest in it.

  Sincerely,

  Ami Tavory

--=20

---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

--001a113ff3c476641505209a229b
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div style=3D"font-size:12.8px">=C2=A0 Hello,</div><div st=
yle=3D"font-size:12.8px"><br></div><div style=3D"font-size:12.8px">=C2=A0=
=C2=A0<a href=3D"https://www.google.co.il/url?sa=3Dt&amp;rct=3Dj&amp;q=3D&a=
mp;esrc=3Ds&amp;source=3Dweb&amp;cd=3D1&amp;cad=3Drja&amp;uact=3D8&amp;ved=
=3D0CBsQFjAAahUKEwiZ4r7qnJPIAhXDSBQKHQCCDpk&amp;url=3Dhttp%3A%2F%2Fwww.open=
-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2013%2Fn3554.pdf&amp;usg=3D=
AFQjCNFgqgAuP5_8RBufJcRmTc0jiuxOLA&amp;sig2=3DABrAEKRd1TJ93ZGyovx_rQ&amp;bv=
m=3Dbv.103627116,d.bGg" target=3D"_blank">N3554</a>=C2=A0proposes execution=
-policy types for algorithms, which is a very beneficial &amp; exciting ste=
p. I&#39;d like to=C2=A0<a href=3D"http://autumn_interleaved.bitbucket.org/=
" target=3D"_blank">suggest</a>=C2=A0the addition of template-decorators fo=
r these basic types, as well as a specialized degenerate &quot;container&qu=
ot; for parallel interleaving between algorithms in a pipeline. While this =
is useful for mainly a specific field - data processing - IMHO it is very u=
seful within it.=C2=A0</div><div style=3D"font-size:12.8px">=C2=A0 Data pro=
cessing often takes the form of a conceptual pipeline of functional-style s=
teps operating on ranges. E.g., given a vector of file names, one might tra=
nsform it into a vector of matrices (by reading &amp; manipulating the cont=
ent of each file corresponding to a file name), and average the matrices in=
 the latter vector.<span style=3D"font-size:12.8px">=C2=A0The pipeline stag=
es often exhibit huge variation in the ranges&#39; elements&#39; size (e.g.=
, a vector of file names is small, but a vector of resulting matrices might=
 be huge) - to the point that some stages cannot fit at once in main memory=
.. The pipelines often can benefit, or actually require (due to the previous=
 point), that some stages begin before previous ones have entirely terminat=
ed.</span></div><div style=3D"font-size:12.8px"><br></div><div style=3D"fon=
t-size:12.8px">=C2=A0 While N3554&#39;s focus is primarily parallel version=
s of the sequential algorithms in=C2=A0<font face=3D"arial, helvetica, sans=
-serif">the standard library</font>,=C2=A0<span style=3D"font-size:12.8px">=
I believe parallelism opens many questions which were irrelevant or unimpor=
tant in sequential execution:</span></div><div style=3D"font-size:12.8px">1=
.. Is the request to operate on all elements concurrently synonymous with a =
permission for all resulting objects to exist concurrently?</div><div style=
=3D"font-size:12.8px">2. What is the chunking size that will work best for =
a particular range and operation? My simulations show that this is both cru=
cial and non-uniform across different types and operations.</div><div style=
=3D"font-size:12.8px">3. Is the request to operate on all elements concurre=
ntly still constrained by the results being aggregated according to the ori=
ginal order? (This question was a non-issue in a sequential setting.)</div>=
<div style=3D"font-size:12.8px">4. What should be the execution relation be=
tween two invocations of algorithms on ranges, when the output of one is th=
e input of another?</div><div style=3D"font-size:12.8px">=C2=A0 These are t=
he points I tried to address in an=C2=A0<a href=3D"http://autumn_interleave=
d.bitbucket.org/" target=3D"_blank">augmentation proposal to N3554</a>. I l=
ook forward to feedback on it, and hope to generate further interest in it.=
</div><div style=3D"font-size:12.8px"><br></div><div style=3D"font-size:12.=
8px">=C2=A0 Sincerely,</div><div style=3D"font-size:12.8px"><br></div><div =
style=3D"font-size:12.8px">=C2=A0 Ami Tavory</div></div>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--001a113ff3c476641505209a229b--

.