ginkgo
ginkgo copied to clipboard
Deprecating `gko::range`
I think we should deprecate our range implementation and the surrounding code in favor of the accessor
interface. The reasons are
- they are nothing but a thin wrapper over an accessor
- we don't use them anywhere except for the CPU ISAI implementation, where they are easy to replace by an accessor
- the implementation of its pointwise operations are very complex, but at the same time cannot provide good performance in parallel contexts
- the value semantics of
gko::range
mean that any time you assign a range to another range, the contents get copied. This is completely different from what a range normally means in C++ land.
I fully agree, I also dislike the copy semantic that the current gko::range
has. My plan was to deprecate the whole gko::range
and everything in the namespace gko::accessor
and replace it with the current accessor interface in gko::acc
.
In the CPU ISAI implementation, we should easily be able to replace it with gko::acc::range
(and gko::acc::row_major
), as this should have mostly the same interface (but without the copy mechanic).
I do have some ideas on how to improve the current accessor interface further (I mean the gko::acc
interface), but was occupied with other projects and did not act on it yet.
I definitively volunteer to do this, but it might take a couple of months until I am ready to do it.