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/
shubham has quit [Quit: Connection closed for inactivity]
K-ballo has quit [Quit: K-ballo]
k-ballo[m] has quit [*.net *.split]
srinivasyadav227 has quit [*.net *.split]
rori has quit [*.net *.split]
gnikunj[m] has quit [*.net *.split]
gnikunj[m] has joined #ste||ar
k-ballo[m] has joined #ste||ar
rori has joined #ste||ar
srinivasyadav227 has joined #ste||ar
K-ballo has joined #ste||ar
jehelset has joined #ste||ar
<jbjnr>
K-ballo: is it possible to instantiate a specialization - only once - say you have a macro and it instantiates a struct member specialized on T, then someone uses the macro and all is fine, but if they use it twice with the same type, it ignore the second one.
<K-ballo>
specializations are already only instantiated once per set of arguments (per TU), jbjnr what are you trying to do?
<jbjnr>
a member of a struct is static, but must only be declared once
<jbjnr>
if the user uses a macro blah_blah(unsigned char) twice, it doesn't try to redeclare the member
<K-ballo>
the macro shouldn't be doing the declaration
<jbjnr>
well, macros shouldn't ever do anything, but we use them for things like action declarations etc
<K-ballo>
why would the macro be the one doing the declaration?
<K-ballo>
memory_region_allocator should be the one doing the declaration
<K-ballo>
template <typename T> mem....
<K-ballo>
you still get one per instantiation, which is one per type
<K-ballo>
if there's a reason for the macro to be doing the declaration, it is not captured by the example snippet
<jbjnr>
I have one of these
<jbjnr>
static mempool_type* mempool_ptr;
<jbjnr>
but I should make it type independent then the problem goes away (allocator<T> uses one and do there needs to be one memool_ptr for each type instantiated, but if the user uses allocator<unknown type> we need to instantiate a mempool_ptr for it
<K-ballo>
one instance per instantiated type, no macros:
<jbjnr>
the point is that I want to put all that inside a macro for something else and don't want it to declare template <typename T> X foo<T>::x; twice is the user puts it in twice. I will type erasse the pool ptr and the problem should go away. I think I should have done that originally, will make it much simpler to manage.
nanmiao has joined #ste||ar
<K-ballo>
you can't possibly put all tha tinside a macro, you'd be redeclaring foo itself
<jbjnr>
I probably didn't explain the problem properly.
<K-ballo>
template <typename T> X foo<T>::x is only ever declared once, and then you get a different foo<T>::x for each T
<jbjnr>
The declaration isn'tt the problem, it's the instantiation of X foo<T>::x; for arbitrary T
<K-ballo>
you don't want different foo<T>::x instances?
<jbjnr>
it wants one for every T, but I want to make sure you can't ever do it twice for the same T, however, I realize after sayng it out loud that I should actually just have one pool ffor all T as I can cast the memory to any T anyway. Thanks for your suggestions.
<K-ballo>
I don't follow why one would provide specializations to begin with, there's no need for them, the linker is capable of producing those itself from a base definition
<K-ballo>
if the linker was asking for them, then there must have not been a base definition.. it was just a matter of providing that base definition
jehelset has quit [Remote host closed the connection]
<K-ballo>
reducing type dependencies when possible is always good, and less symbols too
shubham has joined #ste||ar
<pedro_barbosa[m]>
Hey guys, I'm getting the following error when compiling a program (GIST: https://gist.github.com/PADBarbosa/82a1ceb3cad16ffd5fbb6d12e5d670f4). Anyone knows how to solve it? Do I need to add a flag when building it? I used a simple CMake file (GIST:https://gist.github.com/PADBarbosa/07318f62da55180537fa7fb993c67a7c).
<ms[m]>
I guess that question is for diehlpk_work ^
<ms[m]>
pedro_barbosa: that second gist is possibly private?
<pedro_barbosa[m]>
yeah sorry accidentally created a provate
<pedro_barbosa[m]>
* yeah sorry accidentally created a private
<pedro_barbosa[m]>
* Hey guys, I'm getting the following error when compiling a program (GIST: https://gist.github.com/PADBarbosa/82a1ceb3cad16ffd5fbb6d12e5d670f4). Anyone knows how to solve it? Do I need to add a flag when building it? I used a simple CMake file (GIST:https://gist.github.com/PADBarbosa/db018246fe46475d2fb9538189803907).
<K-ballo>
gists can't be private
<K-ballo>
they can be "secret", which means unlisted, but anyone with the url can still get at them
<pedro_barbosa[m]>
indeed, for a second thought it meant something else, sent a new link though, should work this time
<ms[m]>
pedro_barbosa: you're not linking to hpxcl
<pedro_barbosa[m]>
yeah I believe that's the problem but I tried adding a flag and it said it wasn't being used
<ms[m]>
What flag? Hpxcl is not part of hpx
<pedro_barbosa[m]>
something like "DHPXCL_ROOT=.." with the directory to the HPXCL-master folder
<pedro_barbosa[m]>
I once had a similar problem with HPX and solved it by installing it on the default path, but not sure I can do that to solve this problem
<ms[m]>
You also don't do find_package(hpxcl) so there's not much chance of it finding it (though I don't know what the status of hpxcl's cmake setup is, I saw there was some activity related to that which maybe makes it work if it's broken right now)
<pedro_barbosa[m]>
I'm not entirely sure how to do it with HPXCL, it's my first time using it and was trying to compile a program outside the examples to see if I could do it
<ms[m]>
ok, as I said I don't know much about hpxcl, diehlpk_work is probably most knowledgeable about it
shubham has quit [Quit: Connection closed for inactivity]