possible feature requests and refactoring

Cem Bassoy via ublas <[email protected]> Tue, 1 May 2018 18:42:04 +0200
Newsgroups gmane.comp.lib.boost.ublas
Message-ID <CADrR+FsjyEeMs_VdR=1fWL9QHaU2UVN2iiXmcwaZ9uBKp76=Rw@mail.gmail.com>
--===============6717216605982034880==
Content-Type: multipart/alternative; boundary="00000000000089526a056b27a6fb"

--00000000000089526a056b27a6fb
Content-Type: text/plain; charset="UTF-8"

David, Stefan,

I was just thinking/imagining of the following refactoring and additional
features. Please note that these just ideas and that I cannot yet tell how
much time we need for each task.

One could refactor ublas such that
- there is only one definition of iterators for all types of matrix and
vector template classes including the proxies (instead of defining one
within each template class),
- replacing project functions with overloaded operators in the template
classes using a notation that is similar to the one in MATLAB.

I am not sure, but we might also

- replace template classes for expression templates by generic lambdas,
- removing some proxies matrix_row, matrix_column (was it designed to
establish type safety?)

We might additionally
- replace expression templates by 'smart' expression templates in order to
call functions of high-performance libraries
- on top of smart expression templates include dispatchers or even
schedulers with which we could dispatch between cpu and gpu execution.

Based on my tensor implementation we could discuss these issues in more
detail.

Cem

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

<div dir=3D"ltr"><div><span id=3D"gmail-:8t.co" class=3D"gmail-tL8wMe gmail=
-EMoHub" style=3D"text-align:left" dir=3D"ltr">David, Stefan,<br><br>I was =
just thinking/imagining of the following refactoring and additional feature=
s. <span id=3D"gmail-:8t.co" class=3D"gmail-tL8wMe gmail-EMoHub" style=3D"t=
ext-align:left" dir=3D"ltr">Please note that these just ideas and that I ca=
nnot yet tell how much time we need for each task. </span><br></span></div>=
<span id=3D"gmail-:8t.co" class=3D"gmail-tL8wMe gmail-EMoHub" style=3D"text=
-align:left" dir=3D"ltr"></span><div><span id=3D"gmail-:8t.co" class=3D"gma=
il-tL8wMe gmail-EMoHub" style=3D"text-align:left" dir=3D"ltr"><br>One could=
 refactor ublas such that<br>- there is only one definition of iterators fo=
r all types of matrix and vector template classes including the proxies (in=
stead of defining one within each template class),<br>- replacing project f=
unctions with overloaded operators in the template classes using a notation=
 that is similar to the one in MATLAB.<br><br></span></div><div><span id=3D=
"gmail-:8t.co" class=3D"gmail-tL8wMe gmail-EMoHub" style=3D"text-align:left=
" dir=3D"ltr">I am not sure, but we might also <br></span></div><div><span =
id=3D"gmail-:8t.co" class=3D"gmail-tL8wMe gmail-EMoHub" style=3D"text-align=
:left" dir=3D"ltr"><br>- replace template classes for expression templates =
by generic lambdas,<br></span></div><div><span id=3D"gmail-:8t.co" class=3D=
"gmail-tL8wMe gmail-EMoHub" style=3D"text-align:left" dir=3D"ltr">- removin=
g some proxies <span id=3D"gmail-:8t.co" class=3D"gmail-tL8wMe gmail-EMoHub=
" style=3D"text-align:left" dir=3D"ltr">matrix_row, matrix_column</span> (w=
as it designed to establish type safety?)<br><br></span></div><div><span id=
=3D"gmail-:8t.co" class=3D"gmail-tL8wMe gmail-EMoHub" style=3D"text-align:l=
eft" dir=3D"ltr">We might additionally<br></span></div><div><span id=3D"gma=
il-:8t.co" class=3D"gmail-tL8wMe gmail-EMoHub" style=3D"text-align:left" di=
r=3D"ltr">- replace expression templates by &#39;smart&#39; expression temp=
lates in order to call functions of high-performance libraries<br></span></=
div><div><span id=3D"gmail-:8t.co" class=3D"gmail-tL8wMe gmail-EMoHub" styl=
e=3D"text-align:left" dir=3D"ltr">- on top of smart expression templates in=
clude dispatchers or even schedulers with which we could dispatch between c=
pu and gpu execution.<br></span></div><span id=3D"gmail-:8t.co" class=3D"gm=
ail-tL8wMe gmail-EMoHub" style=3D"text-align:left" dir=3D"ltr"></span><br><=
span id=3D"gmail-:8t.co" class=3D"gmail-tL8wMe gmail-EMoHub" style=3D"text-=
align:left" dir=3D"ltr"></span><div>Based on my tensor implementation we co=
uld discuss these issues in more detail.<span id=3D"gmail-:8t.co" class=3D"=
gmail-tL8wMe gmail-EMoHub" style=3D"text-align:left" dir=3D"ltr"><br><br></=
span></div><div><span id=3D"gmail-:8t.co" class=3D"gmail-tL8wMe gmail-EMoHu=
b" style=3D"text-align:left" dir=3D"ltr">Cem<br></span></div></div>

--00000000000089526a056b27a6fb--

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