ginkgo-project / ginkgo

Numerical linear algebra software package
https://ginkgo-project.github.io/
BSD 3-Clause "New" or "Revised" License
384 stars 86 forks source link

Simple segmented ranges #1601

Open upsj opened 2 months ago

upsj commented 2 months ago

This removes all stride support from #1582, which removes most of the heavy iterator functionality added in the other PR. It relies on zip_iterator to provide both enumerating for (auto [nonzero_index, column, value] : matrix.enumerated()[row]) and non-enumerating for (auto [column, value] : matrix[row]) iteration through a matrix, and uses pairs of pointers to represent ranges of column indices or values. The two commits add the baseline first and C++17 structured binding support second.

TODO

MarcelKoch commented 2 months ago

First up, the zip iterator also need to be made constexpr for this to work on the device.