hkaiser changed the topic of #ste||ar to: STE||AR: Systems Technology, Emergent Parallelism, and Algorithm Research | stellar-group.org | HPX: A cure for performance impaired parallel applications | github.com/STEllAR-GROUP/hpx | This channel is logged: irclog.cct.lsu.edu
diehlpk_work_ has quit [Ping timeout: 240 seconds]
<srinivasyadav227> hkaiser: yt ?
<hkaiser> srinivasyadav227: here
<srinivasyadav227> I am trying to use EVE with cmake fetch content with HPX.
<srinivasyadav227> Currently i have added this https://gist.github.com/srinivasyadav18/a2e8848c6180c0d2f39903869c24f770 HPX_SetupEVE.cmake file
<srinivasyadav227> I am able to use it after installation of hpx by including `#include eve/eve.hpp` in hello world application.
<srinivasyadav227> But I am not able to use `#include eve/eve.hpp` in hpx header files i.e i tried to put in `hpx/execution/traits/vector_pack_type.hpp`
<srinivasyadav227> hkaiser:
<hkaiser> hmmm
<hkaiser> did you add the eve target to the algorithm module?
<hkaiser> how did we do it for Vc?
<hkaiser> let me have a look
<hkaiser> do the same for eve
<srinivasyadav227> hkaiser: eve header only, i think i cant do something like EVE::eve
<hkaiser> yes, use the eve target, whatever it is
<hkaiser> I think you can use it
<hkaiser> I wouldn't do that - if eve exposes targets, use them
<srinivasyadav227> ok cool, got it, i will try them
<hkaiser> srinivasyadav227: btw, HPX_WITH_DATAPAR is not a preprocessor constant, so you shouldn't add this: https://gist.github.com/srinivasyadav18/a2e8848c6180c0d2f39903869c24f770#file-hpx_setupeve-cmake-L51
<hkaiser> the idea is that HPX_WITH_... are cmake constants and HPX_HAVE_... are the corresponding preprocessor constants
<srinivasyadav227> got it, thanks :)
jehelset has quit [Ping timeout: 256 seconds]
hkaiser has quit [Quit: Bye!]
jehelset has joined #ste||ar
jehelset has quit [Ping timeout: 250 seconds]
hkaiser has joined #ste||ar
jehelset has joined #ste||ar
jehelset has quit [Ping timeout: 256 seconds]
<gonidelis[m]> what's the difference in using `for(size_t i` and `for(int i`
<gonidelis[m]> ?
<gonidelis[m]> hkaiser yt?
<hkaiser> one uses int as the loop variable, the other uses size_t ?
jehelset has joined #ste||ar
<gonidelis[m]> hkaiser: lol. yeah i was asking why would you choose on the other as the loop variable, but i guess unsignedness is a good enough reason
<gonidelis[m]> hkaiser: check pm
<zao> gonidelis[m]: on most platforms they also differ in bit width and may also have fairly different codegen as there’s different guarantees a compiler can make about overflow in loops due to UB and optimize based on that. There’s stuff written on that online but I don’t remember where.
<gonidelis[m]> zao: size_t favors performance?
<zao> It’s complicated and I don’t remember which way it goes.
<gonidelis[m]> cool
<hkaiser> gonidelis[m]: size_t is what is returned from vector<>::size()
<gonidelis[m]> nice
<hkaiser> so in order to avoid overflow on you loop variable you should use size_t there as well
<hkaiser> but I'd suggest you switch to iterators to begin with
<gonidelis[m]> hkaiser: that's what i am trying
<gonidelis[m]> does that mean that i turn the function into a template?
<hkaiser> not necessarily, you have always vector<...>::iterator and vector<...>::const_iterator
parsa[fn] has joined #ste||ar
parsa[fn] has quit [Client Quit]
<gonidelis[m]> hkaiser: while i iterate over the vector with for_each
<gonidelis[m]> i want to access both the position of the element
<gonidelis[m]> and the iterator value itself
<gonidelis[m]> i reckon `std::for_each(begin, end, [&](int &val, size_t i){....}` won't work
<hkaiser> what iterator value?
<hkaiser> isn't *it good enough?
<hkaiser> gonidelis[m]: ^^
<gonidelis[m]> yes
<gonidelis[m]> and then what about the index?
<hkaiser> why do you need the index?
<gonidelis[m]> because i need to say from home 2 to home 4
<gonidelis[m]> no?
<hkaiser> fair point
<hkaiser> use indices, then
<hkaiser> it's better for omp anyways, no way to parallelize loops with iterators with omp
<gonidelis[m]> darn
<gonidelis[m]> true
<gonidelis[m]> just wanted to show the hpx supremacy
<gonidelis[m]> plus, dazzle them with some stl
<hkaiser> for hpx you can use for_loop()
<gonidelis[m]> but copying the vector before the input is stilla huge nono
<hkaiser> that can be used with indices too
<gonidelis[m]> oh awesome
<hkaiser> then start your index at 2 and not at 0
<gonidelis[m]> do you mean extracting elements 0 and 1
<gonidelis[m]> and then moving the vector from 2 till the end/
<gonidelis[m]> ??
<gonidelis[m]> actually i can see 2 options. one is anorthodox the other is using copy again
<gonidelis[m]> erase the first two elements and shift everything 2 positions back
<gonidelis[m]> (that's a copy)
<gonidelis[m]> and just create some kind of reference vector form second to last element
<gonidelis[m]> ` auto i = std::distance(v.begin(), it); ` goddamit
jehelset has quit [Ping timeout: 250 seconds]