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
Yorlik__ has joined #ste||ar
Yorlik_ has quit [Ping timeout: 252 seconds]
diehlpk_work has quit [Remote host closed the connection]
hkaiser has quit [Quit: Bye!]
K-ballo has quit [Ping timeout: 248 seconds]
K-ballo1 has joined #ste||ar
K-ballo1 is now known as K-ballo
Yorlik__ has quit [Read error: Connection reset by peer]
Yorlik has joined #ste||ar
tufei has quit [Remote host closed the connection]
tufei has joined #ste||ar
tufei_ has joined #ste||ar
tufei has quit [Remote host closed the connection]
K-ballo1 has joined #ste||ar
K-ballo has quit [Ping timeout: 255 seconds]
K-ballo1 is now known as K-ballo
hkaiser has joined #ste||ar
<gonidelis[m]> what is the difference between value initilization and copy initialization?
<gonidelis[m]> `A * p = new A();`
<gonidelis[m]> and
<gonidelis[m]> `A x = A();`
<gonidelis[m]> lol I just stumbled across this post of
<gonidelis[m]> K-ballo: correcting the answer
<gonidelis[m]> answerer*
<hkaiser> gonidelis[m]: the example above are the same from the standpoint of how the new object is initialized, the difference is in where the memory is the new object is created in
<gonidelis[m]> one is runtime created the other is compile time?
<gonidelis[m]> hkaiser:
<gonidelis[m]> and from K-ballo 's comments: what is the difference between `A x( A() )` and `A x( (A()) )`?
<hkaiser> one calls the default constructor, the other first a default contructor and then the copy constructor
<gonidelis[m]> ok thanks
K-ballo1 has joined #ste||ar
K-ballo has quit [Ping timeout: 252 seconds]
K-ballo1 is now known as K-ballo
<gonidelis[m]> hkaiser: why could this be fixing the runtime error "dereference value-initialized vector" ? https://github.com/pnnl/NWGraph/commit/600d1528c447cd15c7f206e32aa073520fa7ab73
<hkaiser> apparently intersection.begin() refers to a non-existing element
<hkaiser> well, yah, it's an empty vector, see line 120
<hkaiser> set_intersection() outputs results there
<gonidelis[m]> graph could have a certain size no?
<gonidelis[m]> yup i kno
<gonidelis[m]> i just couldn't figure out why the vector would be empty
<gonidelis[m]> since theuy reserved it with a graph.size()
<gonidelis[m]> thus, why the graph.size() would be zero?
<hkaiser> why isn't it empty? where is something added to it?
<hkaiser> reserve doesn't create elements, it just preallocates memory that may be used for those
<gonidelis[m]> it's beeing passed as an argument.
<gonidelis[m]> so I would expect from the caller of the function to have initialized graph with X elements
<hkaiser> it's not the graph that is the issue, it's the intersection vector
<gonidelis[m]> which has a certain size reserved
<gonidelis[m]> equal to graph.size()
<hkaiser> btw, even if you use back_inserter(), I'd still leave the reserve() in place
<hkaiser> gonidelis[m]: reserve() doesn't mean the cetor holds elements
<hkaiser> vector*
<gonidelis[m]> ahhh ok
<hkaiser> after that reserve, intersection.size() == 0
<gonidelis[m]> i thought it would insert back after the reserved size
<hkaiser> why should it?
<gonidelis[m]> beutiful
<gonidelis[m]> ok
<gonidelis[m]> that's what I was mistaking
<gonidelis[m]> mistakening*
<hkaiser> so please leave the reserve in place
<gonidelis[m]> wrong understanding of .reserve()
<gonidelis[m]> my bad
<hkaiser> you might have cofused it with resize()
<gonidelis[m]> i checked the difference
<gonidelis[m]> but yes. you are right
tufei_ has quit [Remote host closed the connection]
tufei_ has joined #ste||ar