Project

General

Profile

Task #2281

Represent data on regularly spaced N-dimensional grids.

Added by Christian Blau over 1 year ago. Updated about 2 months ago.

Status:
In Progress
Priority:
Normal
Category:
core library
Target version:
Difficulty:
uncategorized
Close

Description

The accelerated histogram method (awh), PME summation, fourier-transform and experimental input from crystallography and cryo-EM make extensive use of data on regular grids.

A common data structure should simplify accessing grid points in space and iterating over lattices and parts of them.

Further related to em-core development, a library for cryo-EM refinement, see here [[https://drive.google.com/drive/folders/0BwBKE-uRQnTzQ1AxY0pTWURPelU]]


Related issues

Related to GROMACS - Feature #2282: Density map toolsetNew

Associated revisions

Revision 7156e73a (diff)
Added by Christian Blau 5 months ago

mdspan - basic infrastructure

Setting up directory to contain a stripped-down and modified-for-GROMACS
version of a reference implementation of the LEWG P0009 proposal,
revision 8:
"mdspan: A Non-Owning Multidimensional Array Reference"

Original code is available at
https://github.com/ORNL/cpp-proposals-pub/tree/master/P0009/reference-implementation/include/experimental

Refers to #2281

Change-Id: I4b8dee54e923d269d38e1f71c4e89526768ef42e

Revision b65cb8f0 (diff)
Added by Christian Blau 5 months ago

mdspan - extents of multidimensional arrays.

Extents describe the number of elements along a certain dimension, a
multidimensional index space of rank R. This is equivalent to the
Cartesian product space of integer intervals [0, N_0) x [0, N_1) x ... x
[0,N_{R-1} )

The extents class distinguishes between extents known at compile time
(static) or at run time (dynamic). Static extents are templated to allow
compile time indexing evaluation (part of later patch).

Confer to P0009r8 of the Library Evolution Working Group and
mdspan.extents

Source code copied and modified from Oakridge National Labs repository.

https://github.com/ORNL/cpp-proposals-pub/tree/master/P0009/reference-implementation/include/experimental/bits

Refers #2281

Change-Id: I5301f172fa1d891bcf929a70e3765a2c52b3d8b8

History

#1 Updated by Christian Blau over 1 year ago

#2 Updated by Gerrit Code Review Bot over 1 year ago

Gerrit received a related patchset '1' for Issue #2281.
Uploader: Christian Blau ()
Change-Id: gromacs~master~Ic0363d9b4808fd9c372250ed380cf7f0d0653b65
Gerrit URL: https://gerrit.gromacs.org/7081

#3 Updated by Gerrit Code Review Bot over 1 year ago

Gerrit received a related patchset '1' for Issue #2281.
Uploader: Christian Blau ()
Change-Id: gromacs~master~Ie68c4e103fefc27b5d0e707b66fdb66bda327d6b
Gerrit URL: https://gerrit.gromacs.org/7082

#4 Updated by Gerrit Code Review Bot over 1 year ago

Gerrit received a related patchset '1' for Issue #2281.
Uploader: Christian Blau ()
Change-Id: gromacs~master~I9ea250d26fb06804f1f16912798ec4cb45a07b1d
Gerrit URL: https://gerrit.gromacs.org/7083

#5 Updated by Gerrit Code Review Bot over 1 year ago

Gerrit received a related patchset '1' for Issue #2281.
Uploader: Christian Blau ()
Change-Id: gromacs~master~I3245821b969e8c97d0380fc96bd695dc7e3eed68
Gerrit URL: https://gerrit.gromacs.org/7084

#6 Updated by Gerrit Code Review Bot over 1 year ago

Gerrit received a related patchset '1' for Issue #2281.
Uploader: Christian Blau ()
Change-Id: gromacs~master~I7c874198398eb890ba25b712779f7f1815c8a84c
Gerrit URL: https://gerrit.gromacs.org/7085

#7 Updated by Gerrit Code Review Bot over 1 year ago

Gerrit received a related patchset '1' for Issue #2281.
Uploader: Christian Blau ()
Change-Id: gromacs~master~Id8b0ca4a5e674f69f1ad350565a760473bc3ac56
Gerrit URL: https://gerrit.gromacs.org/7086

#8 Updated by Gerrit Code Review Bot over 1 year ago

Gerrit received a related patchset '1' for Issue #2281.
Uploader: Christian Blau ()
Change-Id: gromacs~master~I2a5eb4f95555ea6bf582cd51d91e380b5889e486
Gerrit URL: https://gerrit.gromacs.org/7087

#9 Updated by Gerrit Code Review Bot over 1 year ago

Gerrit received a related patchset '11' for Issue #2281.
Uploader: Carsten Kutzner ()
Change-Id: gromacs~master~I5f18c33e77d68554456c55c6eedfe6a16d7b3ff0
Gerrit URL: https://gerrit.gromacs.org/6970

#11 Updated by Berk Hess over 1 year ago

  • Status changed from New to In Progress

#12 Updated by Mark Abraham 7 months ago

  • Target version changed from 2019 to 2020

#13 Updated by Christian Blau 6 months ago

I figure there are two different questions to address:
1. How do represent multidimensional arrays, optimally with arbitrary strides, padding and without performance overhead?
2. How do we translate multidimensional coordinates to lattice-point?

For 1. I concluded in https://gerrit.gromacs.org/#/c/7081/:
"Then I would put P0009 [1] from github.com/ORNL/cpp-proposals-pub/ in utilities once we bump to C++14."

For 2:
Build our own, trying to use as much of P0009 infrastructure as possible. Add the iterator back into P0009.

My code built onto N3851, but I planned to rebase onto P0009 once we're through with the beta release.

My hope would be that P0009 would make the Thomas 2d irreg array patch a bit smaller as well; looking at the very good tests there at least.

I would like to gather the relevant use cases that already exist in GROMACS, and start to use new concepts there as much as possible rather than implementing for use in future modules.

#14 Updated by Gerrit Code Review Bot 6 months ago

Gerrit received a related DRAFT patchset '2' for Issue #2281.
Uploader: Christian Blau ()
Change-Id: gromacs~master~Ie9b849a33221315dc1c9fcb2144169405d725ef8
Gerrit URL: https://gerrit.gromacs.org/8626

#15 Updated by Christian Blau 6 months ago

Find related data structures in other tools here:
https://docs.scipy.org/doc/numpy-1.15.0/reference/c-api.types-and-structures.html#c.PyArrayObject
https://docs.python.org/3/c-api/buffer.html#buffer-structure
https://eigen.tuxfamily.org/dox/classEigen_1_1Matrix.html
https://eigen.tuxfamily.org/dox/classEigen_1_1Array.html

The mdspan in P0009 mirrors most of the aspects of matrices in the Eigen library and allows to extract the information needed to build CPyArrayObjects without copying data, so I would argue that this strengthens the case for mdspan even more.

#16 Updated by Gerrit Code Review Bot 5 months ago

Gerrit received a related patchset '1' for Issue #2281.
Uploader: Christian Blau ()
Change-Id: gromacs~master~I5301f172fa1d891bcf929a70e3765a2c52b3d8b8
Gerrit URL: https://gerrit.gromacs.org/8716

#17 Updated by Gerrit Code Review Bot 5 months ago

Gerrit received a related patchset '1' for Issue #2281.
Uploader: Christian Blau ()
Change-Id: gromacs~master~I4b8dee54e923d269d38e1f71c4e89526768ef42e
Gerrit URL: https://gerrit.gromacs.org/8733

#18 Updated by Gerrit Code Review Bot about 2 months ago

Gerrit received a related patchset '1' for Issue #2281.
Uploader: Christian Blau ()
Change-Id: gromacs~master~I5f0c839cd2f516e18dd6d5e5f76fb2f06fb40eef
Gerrit URL: https://gerrit.gromacs.org/9203

#19 Updated by Gerrit Code Review Bot about 2 months ago

Gerrit received a related patchset '1' for Issue #2281.
Uploader: Christian Blau ()
Change-Id: gromacs~master~Ib63ba97edf34928e47b7a9d8461f9817d2cc7e59
Gerrit URL: https://gerrit.gromacs.org/9208

#20 Updated by Gerrit Code Review Bot about 2 months ago

Gerrit received a related patchset '1' for Issue #2281.
Uploader: Christian Blau ()
Change-Id: gromacs~master~I80c0b6815c57b4d387f58f346a33d2ea23996d10
Gerrit URL: https://gerrit.gromacs.org/9213

Also available in: Atom PDF