K-ballo changed the topic of #ste||ar to: STE||AR: Systems Technology, Emergent Parallelism, and Algorithm Research | stellar.cct.lsu.edu | HPX: A cure for performance impaired parallel applications | github.com/STEllAR-GROUP/hpx | Buildbot: http://rostam.cct.lsu.edu/ | Log: http://irclog.cct.lsu.edu/
hkaiser has joined #ste||ar
K-ballo has quit [Quit: K-ballo]
hkaiser has quit [Quit: bye]
bita has quit [Ping timeout: 250 seconds]
heller1 has quit [Quit: Idle for 30+ days]
itn[m] is now known as rainmaker[m]
<gonidelis[m]>
k-ballo: i loved your code! thanks a lot for this sample
<gonidelis[m]>
k-ballo: does this `filter_view` work for a range of elements? or does it only return one filtered element per call?
<gonidelis[m]>
ahh no
<gonidelis[m]>
it's complete
<gonidelis[m]>
there are certain things i don't get though: 1. how does `return {pred, it, last};` work since you are returning a `filter_iterator`?
<gonidelis[m]>
you have no constructors neither for `filter_view` neither for `filter_iterator`
<gnikunj[m]>
gonidelis[m]: the `it` in filter_view is the first iterator that satisfies the condition of the range (effectively creating a range where you know the begin iterator)
<gnikunj[m]>
and `{pred, it, last}` creates a filter_iterator object that assigns to pred, base_it and base_end respectively
<gonidelis[m]>
gnikunj[m]: yes that's what i ask. how are `{pred, it, last}` assigned out of the blue? what mechanism is that?
<gonidelis[m]>
i am not aware of it
<gonidelis[m]>
aahh it must be a memb-init-list
<gonidelis[m]>
i had forgotten about that
<gonidelis[m]>
i am just confused.... since he has a `while-loop`, how does he achieve `O(1)` constness?
<gonidelis[m]>
i can clearly see an O(n) iteration there
K-ballo has joined #ste||ar
<gonidelis[m]>
K-ballo: did the messages in matrix reach you?
<K-ballo>
srinivasyadav227: that's in general not solvable, you need to add a lot of constraints to start approaching it
<K-ballo>
basically, if you only have one non-templated overload, you can get its signature... otherwise, not
<K-ballo>
`decltype(&F::operator())` will give you that signature in the class type case
<K-ballo>
this also doesn't work for surrogate calls
<srinivasyadav227>
K-ballo: ok, thanks, np ;-)
<K-ballo>
if you are trying to use this to solve something concrete, that thing itself may be solvable
<srinivasyadav227>
ok, is it possible to solve only that add_one function?
<K-ballo>
in general? no
<K-ballo>
it has a templated op() overload, so no
<K-ballo>
if you are trying to do some introspection, say for stuff like language binding, then it's just not doable
<K-ballo>
if you are trying to solve something else, it usually can be approached by one or more is callable checks
<srinivasyadav227>
oh ok, its alright ;-) i need to call some function based on user function or function object depending on its first parameter is by value or reference
<srinivasyadav227>
so I was just looking out if that's possible*
<K-ballo>
that's not really a meaningful distinction, what imposses it?
<srinivasyadav227>
<K-ballo "that's not really a meaningful d"> i didnt understand this..could u please elaborate it
<K-ballo>
different semantics for by value vs by reference do not make sense in the language
<K-ballo>
they don't represent anything salient
<K-ballo>
what's requiring you to do something different for by value vs by reference in the first place?
<srinivasyadav227>
<K-ballo "what's requiring you to do somet"> i need to store results to memory from vectors (vector registors) if its called by reference, else i need not store back the result to memory, (here https://github.com/STEllAR-GROUP/hpx/pull/5298#discussion_r619181392) so i was just looking out if this can be done
<K-ballo>
"whenever we know", sometimes you can know, within the constraints given above
<K-ballo>
I don't understand the rest of the vectorized stuff enough for a more meaningful answer, but for the question to make sense I'm sure there's more to it
<K-ballo>
doesn't that code assign to ret and then overwrite it with the aligned store?
<K-ballo>
ah no, value.store() doesn't store into value (like, say, atomic.store())
<K-ballo>
I don't really understand what f has to do with the store operation then
<srinivasyadav227>
its like before calling f(), we load the values from memory into tmp "vc::vector" then apply function on tmp (call f with temp), then store back results to memory
<hkaiser>
K-ballo: the question is whether we can fin dout whether a function takes its only argument by value or by reference/pointer
<hkaiser>
i.e. will f change its argument or not
<srinivasyadav227>
hkaiser: can you please explain this? i put the build error, so is it correct that tag_invoke could not find CPO if its declared later?
<hkaiser>
the tag_invoke functions have to be at least declared before being used
<srinivasyadav227>
hkaiser: ok, would you recommend "declaring tag_invoke before defining and move back the header to top " or "let the header include position be at the bottom?" in util/loop.hpp
<hkaiser>
one of the goals is to remove #including the datapar headers from the non-datapar alltogether
<hkaiser>
but the other way around is ok
<srinivasyadav227>
<hkaiser "one of the goals is to remove #i"> you mean removing #include of datapar headers from util/loop.hpp, util/transform_loop.hpp ?
<hkaiser>
srinivasyadav227: yes
<hkaiser>
srinivasyadav227: wasn't that the goal of disentangling things?
<hkaiser>
srinivasyadav227: the idea is that the user has to #include special headers if he wants to use datapar, the non-datapar headers don't know/care about this
bita has joined #ste||ar
k-ballo[m] has quit [Ping timeout: 245 seconds]
AbanoubAsaad[m] has quit [Ping timeout: 245 seconds]
pedro_barbosa[m] has quit [Ping timeout: 245 seconds]
RosheenNaeem[m] has quit [Ping timeout: 245 seconds]
HaimantikaMitra[ has quit [Ping timeout: 245 seconds]