mdspan - mapping for right layout
commit263edfa750b3a0e942ad2497ef9454d145948650
authorChristian Blau <cblau@gwdg.de>
Tue, 4 Dec 2018 11:10:21 +0000 (4 12:10 +0100)
committerErik Lindahl <erik.lindahl@gmail.com>
Thu, 20 Dec 2018 23:38:32 +0000 (21 00:38 +0100)
treec62598ecea4954628dc823d96c658cf1bc26924d
parentb9e0922af7eccbb4b9110dd0ea99cdac0244a27a
mdspan - mapping for right layout

Introduces a mapping from multdimensional integer space [0...N0) x .. x
[0..Nm) to one-dimensional integers N. In the mdspan context, this will
be used in a later patch to evaluate the memory offset to address
elements in multdimensional arrays.

The layout_right for mdspan, indexes multidimensional arrays with the
fastest changing dimension last, i.e., C-style, row-major for
two-dimensional arrays.

Change-Id: I0f9950bd4a40543c2cad6fe5b2bd668bb42d6784
src/gromacs/mdspan/layouts.h [new file with mode: 0644]
src/gromacs/mdspan/tests/CMakeLists.txt
src/gromacs/mdspan/tests/layouts.cpp [new file with mode: 0644]