[GSOC2020][Boost.uBLAS] C++20-ification of uBLAS

Ashar via ublas <[email protected]> Fri, 13 Mar 2020 23:39:32 +0530
Newsgroups gmane.comp.lib.boost.ublas
Message-ID <CAD0hxun_=Bn68_r6q3G_qCkL3waWQEZFF85HSDKnXzGgdjgzxg@mail.gmail.com>
--===============0240745518372376360==
Content-Type: multipart/alternative; boundary="000000000000c1750e05a0c05f3d"

--000000000000c1750e05a0c05f3d
Content-Type: text/plain; charset="UTF-8"

Hi
My name is Ashar, a pre-final year undergraduate student. Last year I
worked with Boost.uBLAS and added Boost.YAP Expression template and another
student Amit added some new interfaces like subtensor view and other really
cool things.

During the development and addition of new YAP based ET, I did faced many
issues with the legacy C++ code in matrix and vectors, this was more
pronounced as Boost.uBLAS.tensor was targetting C++17 and rest of the uBLAS
had C++11 or earlier code. The new project about C++20-ification of
Boost.uBLAS seems a really nice step towards creating a more unified and
standardized experience across all 3 types (vector, matrix, tensor) also we
can experiment if C++20 does makes things faster or not.

I have been following C++20 since its first draft (July 2017, Toronto) and
now that it has been finalized, I have tested and experimented with most of
its features with clang/gcc/trunks. So, I believe this makes me a potential
candidate for this project.

I am interested in working in this project and Here are some of the ideas
in general that I have toward C++20-ification of uBLAS.

1. concepts : We have so many type_traits.hpp and all those legacy traits
which can be really replaced by new concepts. It will make template type
errors really short and nice to debug.

2. The one ranges : Eric Neibler's one ranges will be very nice to have in
uBLAS, we currently have iterator based abstraction but since ranges are
the new way to interact with containers in C++20, addition of this will
really make uBLAS one of its kind in Linear algebra. Further more, Amit's
work can be used here and we can have views and adapter (only for tensor
upto now).

3. std::span : Span are used widely in linear algebra and with C++20,
Standard has added it. Albeit uBLAS has its own span and extents it will be
very good to make them compatible or interoperable with standard spans.

4. Constexpr-ification : C++20 made so much things constexpr, try/catch to
even dynamic containers like vector and strings. We can really leverage the
new constexpr abilities like memory allocation and freeing to build a
really awesome constexpr vector/matrix/tensor interfaces.

5. Modules : Finally we got rid of leaky include directives, making uBLAS
modules based will be I think the first library in Boost to have it.

6. New Tool-chains : Travis CI is used for CI and its at best cannot give
over 18.04LTS for jobs, Setting up CI with modern tool-chain to build and
run C++20 will also be a job of its own.

7. Misc: spaceship operator and other minor changes like
feature/test-macros and other minor topping that comes with C++20 can be
used really nicely.


I am also very aware of that all these can take much more time than what we
get in GSOC, but I will choose and prioritise the task, I have just
proposed some new things that I would like to add if given a chance to work
on it. I have intensionally left coroutines and other features because I
can't find any practical use of those features for uBLAS. If you have some
ideas, how we can use it to improve then please its welcomed.

Cem and David are the mentors that I am seeking and I will be submitting my
C++20 competency test to one of you very soon. Please consider this as
official application email and we can always further discuss and finalize
the direction of the work directly.

Regards

--000000000000c1750e05a0c05f3d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div dir=3D"auto">Hi<br></div><div dir=3D"auto">My name i=
s Ashar, a pre-final year undergraduate student. Last year I worked with Bo=
ost.uBLAS and added Boost.YAP Expression template and another student Amit =
added some new interfaces like subtensor view and other really cool things.=
</div><div dir=3D"auto"><br></div><div dir=3D"auto">During the development =
and addition of new YAP based ET, I did faced many issues with the legacy C=
++ code in matrix and vectors, this was more pronounced as Boost.uBLAS.tens=
or was targetting C++17 and rest of the uBLAS had C++11 or earlier code. Th=
e new project about C++20-ification of Boost.uBLAS seems a really nice step=
 towards creating a more unified and standardized experience across all 3 t=
ypes (vector, matrix, tensor) also we can experiment if C++20 does makes th=
ings faster or not.</div><div dir=3D"auto"><br></div><div dir=3D"auto">I ha=
ve been following C++20 since its first draft (July 2017, Toronto) and now =
that it has been finalized, I have tested and experimented with most of its=
 features with clang/gcc/trunks. So, I believe this makes me a potential ca=
ndidate for this project.</div><div dir=3D"auto"><br></div><div dir=3D"auto=
">I am interested in working in this project and Here are some of the ideas=
 in general that I have toward C++20-ification of uBLAS.=C2=A0</div><div di=
r=3D"auto"><br></div><div dir=3D"auto">1. concepts : We have so many type_t=
raits.hpp and all those legacy traits which can be really replaced by new c=
oncepts. It will make template type errors really short and nice to debug.=
=C2=A0</div><div dir=3D"auto"><br></div><div dir=3D"auto">2. The one ranges=
 : Eric Neibler&#39;s one ranges will be very nice to have in uBLAS, we cur=
rently have iterator based abstraction but since ranges are the new way to =
interact with containers in C++20, addition of this will really make uBLAS =
one of its kind in Linear algebra. Further more, Amit&#39;s work can be use=
d here and we can have views and adapter (only for tensor upto now).</div><=
div dir=3D"auto"><br></div><div dir=3D"auto">3. std::span : Span are used w=
idely in linear algebra and with C++20, Standard has added it. Albeit uBLAS=
 has its own span and extents it will be very good to make them compatible =
or interoperable with standard spans.</div><div dir=3D"auto"><br></div><div=
 dir=3D"auto">4. Constexpr-ification : C++20 made so much things constexpr,=
 try/catch to even dynamic containers like vector and strings. We can reall=
y leverage the new constexpr abilities like memory allocation and freeing t=
o build a really awesome constexpr vector/matrix/tensor interfaces.</div><d=
iv dir=3D"auto"><br></div><div dir=3D"auto">5. Modules : Finally we got rid=
 of leaky include directives, making uBLAS modules based will be I think th=
e first library in Boost to have it.=C2=A0</div><div dir=3D"auto"><br></div=
><div dir=3D"auto">6. New Tool-chains : Travis CI is used for CI and its at=
 best cannot give over 18.04LTS for jobs, Setting up CI with modern tool-ch=
ain to build and run C++20 will also be a job of its own.</div><div dir=3D"=
auto"><br></div><div dir=3D"auto">7. Misc: spaceship operator and other min=
or changes like feature/test-macros and other minor topping that comes with=
 C++20 can be used really nicely.</div><div dir=3D"auto"><br></div><div dir=
=3D"auto"><br></div><div dir=3D"auto">I am also very aware of that all thes=
e can take much more time than what we get in GSOC, but I will choose and p=
rioritise the task, I have just proposed some new things that I would like =
to add if given a chance to work on it. I have intensionally left coroutine=
s and other features because I can&#39;t find any practical use of those fe=
atures for uBLAS. If you have some ideas, how we can use it to improve then=
 please its welcomed.</div><div dir=3D"auto"><br></div><div dir=3D"auto">Ce=
m and David are the mentors that I am seeking and I will be submitting my C=
++20 competency test to one of you very soon. Please consider this as offic=
ial application email and we can always further discuss and finalize the di=
rection of the work directly.</div><div dir=3D"auto"><br></div><div dir=3D"=
auto">Regards</div></div>

--000000000000c1750e05a0c05f3d--

--===============0240745518372376360==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline