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
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ Many programming languages commonly used in scientific computing support multidi
53
53
54
54
Despite their importance, multidimensional arrays introduce several practical challenges. In a sense, they encourage the usage of implicit information in the source code. A frequent source of errors is the inadvertent swapping of indices when accessing elements. Such errors can be difficult to detect, especially given the common convention of using single-letter variable names like `i` and `j` for indexing. Another challenge in medium to large codebases is the lack of semantic clarity in function signatures when using raw multidimensional arrays. When array dimensions carry specific meanings, this information is not explicitly represented in the source code, leaving it up to the user to ensure that dimensions are ordered correctly according to implicit expectations. For example it is quite usual to use the same index for multiple interpretations: looping over mesh cells identified by `i` and interpreting `i+1` as the face to the right. Another example is slicing that removes dimensions, this can shift the positions of remaining dimensions, altering the correspondence between axis indices and their semantic meanings.
55
55
56
-
Solutions have been proposed to address these issues. For example in Python, the Xarray [@hoyer2017xarray] library allows users to label dimensions that can then be used to perform computations. Following a similar approach, the "Discrete Domain Computation" (DDC) library aims to bring equivalent functionality to the C++ ecosystem. It uses a zero overhead abstraction approach, i.e. with labels fixed at compile-time, on top of different performant portable libraries, such as: Kokkos [@9485033], Kokkos Kernels [@rajamanickam2021kokkos], kokkos-fft [@kokkos-fft] and Ginkgo [@GinkgoJoss2020]. Labelling at compile time is achieved by strongly typing dimensions, an approach similar to that used in units libraries such as mp-units [@Pusz_mp-units_2024], which strongly type quantities rather than dimensions.
56
+
Solutions have been proposed to address these issues. For example in Python, the Xarray [@hoyer2017xarray] library allows users to label dimensions that can then be used to perform computations. Following a similar approach, the "Discrete Domain Computation" (DDC) library aims to bring equivalent functionality to the C++ ecosystem. It uses a zero overhead abstraction approach, i.e. with labels fixed at compile-time, on top of different performant portable libraries, such as: Kokkos [@9485033, @9502936], Kokkos Kernels [@rajamanickam2021kokkos], kokkos-fft [@kokkos-fft] and Ginkgo [@GinkgoJoss2020]. Labelling at compile time is achieved by strongly typing dimensions, an approach similar to that used in units libraries such as mp-units [@Pusz_mp-units_2024], which strongly type quantities rather than dimensions.
57
57
58
58
The library is actively used to modernize the Fortran-based Gysela plasma simulation code [@Bourne_Gyselalib]. This simulation code relies heavily on high-dimensional arrays. While the data stored in the arrays has 7 dimensions, each dimension can have multiple representations, including Fourier, spline, Cartesian, and various curvilinear meshes. The legacy Fortran implementation, used to manipulate multi-dimensional arrays that stored slices of all the possible dimensions with very limited information about which dimensions were actually represented to enforce correctness at the API level. DDC enables a more explicit, strongly-typed representation of these arrays, ensuring at compile-time that function calls respect the expected dimensions. This reduces indexing errors and improves code maintainability, particularly in large-scale scientific software.
59
59
@@ -101,7 +101,7 @@ The library provides several ways to group `DiscreteElement` into sets, each rep
101
101
102
102
### Multidimensional algorithms
103
103
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.
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[@10820764], enabling conversions between sampled data and coefficients in Fourier or B-spline bases over labeled dimensions.
0 commit comments