Re: [eigen] Google Summer of Code 2018 - Symmetric Matrices for Eigen

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


I'd leave the choice what to implement to David. Of course, before this will be merged, there should be some benchmarking to make sure it does not totally kill performance (and it would be wise to start benchmarking early on). Slightly subpar performance may be ok in certain situations (e.g., if someone is using this format for storage or data transfer already and can't change that). It may also depend on the size of the matrices which format is better (and on the used CPU architecture). I doubt that RFPF is superior to simple packed format for 4x4 matrices (I did not benchmark this).

Cheers,
Christoph

On 2018-05-03 20:18, Márton Danóczy wrote:
Hi Christoph,

supporting the "Packed Format" is not worth it, even LAPACK have dropped
support because of the FP routines' subpar performance (see the second
comment in this thread:
https://github.com/Reference-LAPACK/lapack/issues/245). The RFP format is
and will keep being supported by LAPACK (same Github thread).

Another reference:
https://software.intel.com/en-us/mkl-developer-reference-c-matrix-storage-schemes-for-lapack-routines

Best
Márton

On 3 May 2018 at 19:28, Christoph Hertzberg <chtz@xxxxxxxxxxxxxxxxxxxxxxxx>
wrote:

Hi,

mostly repeating what I told David privately already:

I suggest implementing a compact _triangular_ matrix which can be used
together with SelfAdjointView to represent selfadjoint matrices as well.

And then I'd like to point anyone interested in this discussion to this
(very old) feature request:
http://eigen.tuxfamily.org/bz/show_bug.cgi?id=42
This also mentions the RFPF suggested by Márton -- but we probably should
support both and start with the one which is easier to implement.


Cheers,
Christoph


On 2018-05-03 00:01, David A. Tellenbach wrote:

Hello together,

my name is David Tellenbach, I'm currently studying Computer Science at
the LMU Munich, Germany and got chosen for the Google Summer of Code 2018
Project "Faster Matrix Algebra for ATLAS", supervised by Dmitry Emeliyanov
and Stewart Martin-Haugh.

Google Summer of Code is a global program focused on bringing more
student developers into open source software development. Students work
with an open source organization on a three month programming project
during their break from school.

As you might know, our project's task is to implement support for
symmetric matrices for Eigen. A short project description is available via
the following link: https://summerofcode.withgoogl
e.com/projects/#5293950017994752 <https://summerofcode.withgoog
le.com/projects/#5293950017994752>

The official coding period hasn't started yet and lasts for three month,
from May, 14 until August, 14 2018. The time now is meant to get to know
the community and people involved.

As far as I see, Eigen basically provides three types of matrices: Dense,
sparse and diagonal matrices. Of these types, the class
Eigen::DiagonalMatrix seems to be the one that could be most similar to a
possible implementation of a class for symmetric matrices. There is no need
for storing all elements (as in the case of dense matrices) neither is a
sophisticated mechanism to find the position of scalars in the matrix
needed (as in the case of sparse matrices). Therefore I’d like to create
the for symmetric matrices by deriving from Eigen::EigenBase (as in the
case of diagonal matrices).

Of course one goal is to store only the upper or lower triangular part of
the matrix since this already defines it completely. Similar to
Eigen::DiagonalMatrix the storage could look something like this:

      typedef typename internal::traits<Derived>::SymmetricVectorType
SymmetricVectorType;

    // Store just one triangular part of the matrix
    typedef Matrix<_Scalar, (SizeAtCompileTime * SizeAtCompileTime +
SizeAtCompileTime)/2,
      1, 0, (MaxSizeAtCompileTime * MaxSizeAtCompileTime +
MaxSizeAtCompileTime)/2 ,1> SymmetricVectorType;

We plan to provide constructors which take either matrices of type
Eigen::Matrix<…> or Eigen::SelfAdjointView<…>.

What do you think about these broad plans so far? We are happy about any
feedback.

Thanks,
David



--
  Dr.-Ing. Christoph Hertzberg

  Besuchsadresse der Nebengeschäftsstelle:
  DFKI GmbH
  Robotics Innovation Center
  Robert-Hooke-Straße 5
  28359 Bremen, Germany

  Postadresse der Hauptgeschäftsstelle Standort Bremen:
  DFKI GmbH
  Robotics Innovation Center
  Robert-Hooke-Straße 1
  28359 Bremen, Germany

  Tel.:     +49 421 178 45-4021
  Zentrale: +49 421 178 45-0
  E-Mail:   christoph.hertzberg@xxxxxxx

  Weitere Informationen: http://www.dfki.de/robotik
  -----------------------------------------------------------------------
  Deutsches Forschungszentrum fuer Kuenstliche Intellig
<https://maps.google.com/?q=ches+Forschungszentrum+fuer+Kuenstliche+Intellig&entry=gmail&source=g>enz
GmbH
  Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
  Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
  (Vorsitzender) Dr. Walter Olthoff
  Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
  Amtsgericht Kaiserslautern, HRB 2313
  Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
  USt-Id.Nr.:    DE 148646973
  Steuernummer:  19/672/50006
  -----------------------------------------------------------------------





--
 Dr.-Ing. Christoph Hertzberg

 Besuchsadresse der Nebengeschäftsstelle:
 DFKI GmbH
 Robotics Innovation Center
 Robert-Hooke-Straße 5
 28359 Bremen, Germany

 Postadresse der Hauptgeschäftsstelle Standort Bremen:
 DFKI GmbH
 Robotics Innovation Center
 Robert-Hooke-Straße 1
 28359 Bremen, Germany

 Tel.:     +49 421 178 45-4021
 Zentrale: +49 421 178 45-0
 E-Mail:   christoph.hertzberg@xxxxxxx

 Weitere Informationen: http://www.dfki.de/robotik
 -----------------------------------------------------------------------
 Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
 Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
 Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
 (Vorsitzender) Dr. Walter Olthoff
 Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
 Amtsgericht Kaiserslautern, HRB 2313
 Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
 USt-Id.Nr.:    DE 148646973
 Steuernummer:  19/672/50006
 -----------------------------------------------------------------------



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/