Topic: Support for storage ordering in N4087:Multidimensional


Author: Jesse Perla <jesseperla@gmail.com>
Date: Wed, 2 Jul 2014 09:44:20 -0700 (PDT)
Raw View
------=_Part_256_9720038.1404319460575
Content-Type: text/plain; charset=UTF-8

The latest N4087 is very close to being usable by a large number of
audiences, but is missing an essential feature: compile-time control of
storage ordering for interoperability with existing libraries.  Not some
fancy dimension by dimension specification, but a global, static control.
 This isn't just an index traversal issue either, as static dispatching is
necessary to match the algorithm to the storage order.

This isn't a 2nd order issue because, as it requires a template parameter
in several of the classes,* it cannot be added later without major breaking
changes and potential redesigns*.  So if it is left out, it is - in
practice -  preventing this class from ever having that feature.  And since
array_view becomes the LCD interface for any future multi_array class, it
means C++ will never have the storage ordering in its standard library.
 Which means that if this is intended to make it easier to pass around
pointers to data with bounds for doing numerical computing, then it will
not be used by any of the major scientific libraries out there or
interoperability with other languages such as Matlab, Python, R, or others.
 Users for many audiences will be even more confused: "why exactly can't I
use the standard class with my favorite library?"

*EVERY SINGLE* major multi-array implementation or 2-dimensional linear
algebra library has control over storage ordering.  There are performance
reasons for huge multi-arrays depending on what traverse order each
algorithm has, and hence cache locality and optimizations abound.  But the
main reasons are that a large number of scientific libraries (such as
LAPACK) are intended for column-major even if they sometimes have transpose
flags, and hence every downstream library has to support it.  Who uses
these sorts of libraries?  It isn't just a niche audience of academics, and
it is going to grow.  It includes engineering, finance, statistics, image
processing, OpenGL, optimization in industries such as airlines, anyone
doing anything with social networks, etc.

--

---
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 email 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-proposals/.

------=_Part_256_9720038.1404319460575
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div>The latest N4087 is very close to being usable b=
y a large number of audiences, but is missing an essential feature: compile=
-time control of storage ordering for interoperability with existing librar=
ies. &nbsp;Not some fancy dimension by dimension specification, but a globa=
l, static control. &nbsp;This isn't just an index traversal issue either, a=
s static dispatching is necessary to match the algorithm to the storage ord=
er.</div><div><br></div><div>This isn't a 2nd order issue because, as it re=
quires a template parameter in several of the classes,<b> it cannot be adde=
d later without major breaking changes and potential redesigns</b>. &nbsp;S=
o if it is left out, it is - in practice - &nbsp;preventing this class from=
 ever having that feature. &nbsp;And since array_view becomes the LCD inter=
face for any future multi_array class, it means C++ will never have the sto=
rage ordering in its standard library. &nbsp;Which means that if this is in=
tended to make it easier to pass around pointers to data with bounds for do=
ing numerical computing, then it will not be used by any of the major scien=
tific libraries out there or interoperability with other languages such as =
Matlab, Python, R, or others. &nbsp;Users for many audiences will be even m=
ore confused: "why exactly can't I use the standard class with my favorite =
library?"&nbsp;</div><div><br></div><div><b>EVERY SINGLE</b> major multi-ar=
ray implementation or 2-dimensional linear algebra library has control over=
 storage ordering. &nbsp;There are performance reasons for huge multi-array=
s depending on what traverse order each algorithm has, and hence cache loca=
lity and optimizations abound. &nbsp;But the main reasons are that a large =
number of scientific libraries (such as LAPACK) are intended for column-maj=
or even if they sometimes have transpose flags, and hence every downstream =
library has to support it. &nbsp;Who uses these sorts of libraries? &nbsp;I=
t isn't just a niche audience of academics, and it is going to grow. &nbsp;=
It includes engineering, finance, statistics, image processing, OpenGL, opt=
imization in industries such as airlines, anyone doing anything with social=
 networks, etc.</div></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 />

------=_Part_256_9720038.1404319460575--

.