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/
K-ballo has quit [Quit: K-ballo]
hkaiser has quit [Quit: bye]
jehelset has joined #ste||ar
diehlpk_work_ has joined #ste||ar
diehlpk_work has quit [Ping timeout: 240 seconds]
K-ballo has joined #ste||ar
<jedi18[m]1>
Hi! So I'm trying to debug and understand the tag_fallback_invoke, could someone please give me an example of a cpo for the adjacent_find function? What should be the function signature of the friend function inside the struct? I've tried a couple of times but it dosen't compile
<jedi18[m]1>
Do I have hpx::adjacent_find_t as the first parameter?
<jedi18[m]1>
Thanks yeah I've seen the example and understand how to use it, I'm trying to understand how it works.
<srinivasyadav227>
jedi18: the first argument is cpo, in the code you showed above first argument is hpx::adjacent_find_t fn or hpx::adjacent_find_t_fn? (did you miss an underscore?)
<srinivasyadav227>
jedi18: ok cool!
<jedi18[m]1>
Nope, hpx::adjacent_find_t works for me
<srinivasyadav227>
ok :)
<jedi18[m]1>
Ok so the paper is a bit too much so I tried debugging and seeing how the execution takes place to try and understand
<hkaiser>
jedi18[m]1, srinivasyadav227: you might want to read up on the C++ rules of function overloading and argument dependent lookup (ADL)
<srinivasyadav227>
jedi18: I understood in an abstract manner, if you have any example could please you share?
<jedi18[m]1>
So ADL should see both the friend overloads right?
<jedi18[m]1>
Why does it choose the test_cpo overload?
<hkaiser>
you might want also look at CRTP (Curiosly Recurring Template Pattern), and how function objects work (hint: operator()())
<hkaiser>
in general, you might want to fully understand how templates work (template functions in this case)
<hkaiser>
the tag_invoke stuff is a combination of techniques, all referenced in wg21.link/p1895
<srinivasyadav227>
hkaiser: could you please share any references, I tried searching in different talks and blogs, but couldn't really get a clear idea of what's happening inside
<hkaiser>
I know it's a tough read, but it has everything
<jedi18[m]1>
hkaiser: Thanks! I do have some idea about those topics but yeah I'll read up on those again to get a solid understanding about those concepts.
<jedi18[m]1>
Ohh ok I'll read the paper properly then
<hkaiser>
in the end everyting is easy, create a small example for yourself and use a debugger to step through the code
<jedi18[m]1>
You mean see the code of duck_invoke or it's docs/how to use it?
<hkaiser>
jedi18[m]1: reading code is the best way of learning how to progra,
<srinivasyadav227>
hkaiser: Thanks, Yeah, I would take some time and give it a hard try again and understand it
<jedi18[m]1>
Ohh ok thanks, I'll check that out too
<hkaiser>
this is probably worth recording another lecture for the c++ series...
<jedi18[m]1>
Haha yeah, your c++ series was great! Hope you record more videos
<srinivasyadav227>
hkaiser: yea very much helpful. I am new to ADL, CPOs and stuff, just started to understand them slowly now, and lecture would be great for new one`s.
<gnikunj[m]>
srinivasyadav227: iirc some operations are yet to be implemented, so yes it is an active project for GSoC 2021. For our TODO list on blaze tensor, see: https://github.com/STEllAR-GROUP/blaze_tensor/issues/2
<srinivasyadav227>
gnikunj[m]: ok, I will check them out, what's iirc?
<gnikunj[m]>
If I remember correctly ;)
<srinivasyadav227>
haha,,ok, thanks :)
<hkaiser>
srinivasyadav227: yes
<gnikunj[m]>
hkaiser: you have a few minutes to spare for a call?
<hkaiser>
gnikunj[m]: sorry, not right now - have roofers running around my house ;-)
<gnikunj[m]>
better handle them not breaking your ceiling then ;)
<hkaiser>
right
<gonidelis[m]>
They are there probably for some seminar running by hkaiser
nanmiao has quit [Quit: Ping timeout (120 seconds)]
diehlpk_work_ has quit [Quit: Leaving]
diehlpk_work has joined #ste||ar
<gonidelis[m]>
hkaiser: yt?
<hkaiser>
here
<gonidelis[m]>
i am very hard trying to understand why hpx::parallel::v1::remove() cannot see hpx::remove_if
<gonidelis[m]>
which is implemented through the CPO
<gonidelis[m]>
is this normal/
<gonidelis[m]>
?
<hkaiser>
gonidelis[m]: I don't think it's a good idea to call a top-level algorithm from inside the implementation of another algorithm
<gonidelis[m]>
ok good... i fell uncomfortable too
<gonidelis[m]>
but since parallel::remove calls parallel::remove_if we get a depr warning
<gonidelis[m]>
and you said i change that so it calls the new version
<gonidelis[m]>
i cannot find a way where that is accomplished without calling the top level algo
<hkaiser>
gonidelis[m]: show me the code that causes the deprecation, I'll have another look
<gonidelis[m]>
sec
<gonidelis[m]>
i don't know if you saw my discussion with K-ballo
<hkaiser>
gonidelis[m]: you're calling a function from inside a deprecated (outer) function, so no wonder you're seeing a deprecation whenever you call the outer one
<K-ballo>
?
<K-ballo>
the claim was that remove_if isn't actually deprecated
<K-ballo>
the deprecation complains about the function itself
<K-ballo>
gonidelis[m]: did you sort out your lookup issues?
<gonidelis[m]>
K-ballo: what do you mean?
<K-ballo>
you were getting errors when qualifying some identifier
<gonidelis[m]>
(i am trying clang once again, i think i forgot to clean my build previously)
<gonidelis[m]>
K-ballo: yeah that's what i just asked hartmut
<gonidelis[m]>
he is suggesting (and i aggree) that is not a good idea to call the top level hpx::remove_if from inside the source ipmlementation of hpx::parallel::remove
<K-ballo>
definitely
<gonidelis[m]>
i don't know why it cannot find it, but i know that it does not feel right