iterators for core eve library, how should that look. #1151
DenisYaroshevskiy
started this conversation in
Research & Development
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
eve core library has some things that I'd classify as algorithms:
load/store aggregated wide
compress_store (should generate the individual components to store).
Based on this I see the following operations required:
unalign - compress store need to advance by arbitrary runtime n.
reduce_alignment - load aggregated needs to reduce alignment twice
+= or advance
I would also say that the following operations should work
previous_partially_aligned(it, eve::fixed)
next__partially_aligned(it, eve::fixed)
equality and ordering
distance
read if input
write if output
load for arbitrary cardinal if input
store for arbitrary cardinal if output
The list of extra operations implies that
kumi::tuple<pointer ...>
cannot be made a valid iterator - because equality/ordering are done by all components. While they should only be done via one component.This leads me to think that we need a separate zip_pointer/ tuple_pointer/soa_pointer type.
The problem is, we kinda have one in
algo::views
:algo::views::zip
.However, that one I find a little problematic to bring into core - it'd drag a lot of algo with it.
So I suggest maybe having an soa_pointer in eve. Or zip_pointer.
It will be a duplication with algo and in certain cases we'll have two types that mean the same thing, like:
soa_pointer<int*, int*> and views::zip_iterator<int*, int*>
But I don't see a better option.
Why not bring eve::algo::views::zip in eve?
Mostly because zip can be applied to ranges.
Also kinda seems akward, some views are in eve, some in views.
Beta Was this translation helpful? Give feedback.
All reactions