Algebraic-Programming / ALP

Home of ALP/GraphBLAS and ALP/Pregel, featuring shared- and distributed-memory auto-parallelisation of linear algebraic and vertex-centric programs. Soon with more to come!
Apache License 2.0
24 stars 4 forks source link

Assignment-operator from temporaries overwrites ID #168

Open anyzelman opened 1 year ago

anyzelman commented 1 year ago

Consider the following, in which the final assertion is assumed to hold:

grb::Vector< T > a( n ), b( n );
size_t a_id = grb::getID( a );
assert( grb::getID( b ) != a_id );
// ...
a = b;
assert( grb::getID( a ) == a_id );

Two items:

  1. this is currently guaranteed in all backends for copy-assignment, but is never tested;
  2. this seems currently not guaranteed for move-assignment.

This issue is to introduce such a test, and confirm whether the latter issue indeed exists

anyzelman commented 7 months ago

May be related to #279

anyzelman commented 5 months ago

Hi @aleksamilisavljevic -- not sure if you're still checking these, but I see you were assigned on this one. Was there indeed a branch somewhere working on this? (If not, no worries-- will reassign and handle it on our end:)

aleksamilisavljevic commented 5 months ago

Hi @anyzelman, I think that you assigned this due to a potential relation to #279. However, I haven't made any investigations about the items mentioned in this issue, i.e. there is no such branch.