You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: paper/paper.md
+1-104Lines changed: 1 addition & 104 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,13 +55,6 @@ The library is actively used to modernize the Fortran-based Gysela plasma simula
55
55
56
56
The DDC library is a C++ library designed for expressive and safe handling of multidimensional data. Its core component provides flexible data containers along with algorithms built on top of the performance portable Kokkos library. The library is fully compatible with Kokkos and does not attempt to hide it, allowing users to leverage Kokkos' full capabilities while benefiting from DDC’s strongly-typed, labelled multidimensional arrays when and where it makes sense.
57
57
58
-
### Containers
59
-
60
-
DDC offers two multidimensional containers designed over the C++ 23 multidimensional array `std::mdspan`:
61
-
62
-
-`Chunk` an owning container, i.e. it manages the lifetime of the underlying memory allocation,
63
-
-`ChunkSpan` is a non-owning container view on an existing memory allocation.
64
-
65
58
### Strongly-typed labelled indices
66
59
67
60
DDC employs strongly-typed multi-indices to label dimensions and access data. It introduces two types of multi-indices to access the container's data:
@@ -106,105 +99,9 @@ The library provides multiple ways to group `DiscreteElement`s into sets. Each s
106
99
107
100
The performance of the container's data access depends on the properties of the set considered. Indeed the set is used to retrieve the position of a given multi-index relative to the front multi-index. Thus the performance of this operation depends on the information available in the set.
108
101
109
-
### Slicing
110
-
111
-
Similar to `std::mdspan`, DDC containers support slicing through the bracket operator that always returns a `ChunkSpan`. The key property is that the resulting slice’s set of `DiscreteElement` is a subset of the original set.
112
-
113
102
### Multidimensional algorithms
114
103
115
-
Finally, DDC offers multidimensional algorithms to manipulate the containers and associated `DiscreteElement` indices. The parallel versions are based on Kokkos providing performance portability. Here is a list as of version 0.7:
116
-
117
-
-`parallel_deepcopy`, copies two `ChunkSpan` that are defined on the same set of `DiscreteElement`,
118
-
-`parallel_for_each`, applies a function once per `DiscreteElement` of a set of `DiscreteElement`,
119
-
-`parallel_fill`, fills a `ChunkSpan` with a value,
120
-
-`parallel_transform_reduce`, applies a function once per `DiscreteElement` of a set of `DiscreteElement` and combines the returned values with a reducer.
121
-
122
-
## Example
123
-
124
-
Let us illustrate the basic concepts introduced above with an example that initializes an array with a given value.
125
-
126
-
```cpp
127
-
#include<iostream>
128
-
129
-
#include<ddc/ddc.hpp>
130
-
131
-
#include<Kokkos_Core.hpp>
132
-
133
-
// Define two independent dimensions
134
-
structDim1
135
-
{
136
-
};
137
-
structDim2
138
-
{
139
-
};
140
-
141
-
// For the purpose of the demonstration, this function only makes sense with Dim2
Built on top of DDC core, we also provide optional components as in the Xarray ecosystem. As of today we provide three components: fft, pdi and splines.
200
-
201
-
### DDC fft and splines
202
-
203
-
The DDC library leverages dimension labelling to provide FFT and spline transform components. Both operate on input data defined over point-sampled dimensions. The Fourier transform produces coefficients defined on a Fourier-space dimension, in a manner similar to the xrft library [@xrft] in Python. The spline transform returns coefficients defined over a B-Spline basis dimension [@10820764]. Both components are built on top of performance-portable libraries, including Kokkos Kernels, Kokkos-FFT, and Ginkgo.
204
-
205
-
### DDC pdi
206
-
207
-
The PDI library [@pdi] is a C data interface library allowing loose coupling with external libraries through PDI plugins like HDF5, NetCDF, Catalyst and more. This extension eases the metadata serialisation of the DDC containers. Instead of manually exposing sizes, strides and the pointer of the underlying array, the user can directly expose the DDC container.
104
+
Finally, DDC offers multidimensional algorithms to manipulate the containers and associated `DiscreteElement` indices such as parallel loops and reductions. The parallel versions are based on Kokkos providing performance portability. DDC also provides transform-based algorithms such as discrete Fourier transforms (via a Kokkos-fft wrapper) and spline transforms, enabling conversions between sampled data and coefficients in Fourier or B-spline bases over labeled dimensions.
0 commit comments