Skip to content

std::swap for nonblocking vectors is broken #408

Description

@anyzelman

Consider test 6 in tests/unit/dot.cpp:

	rc = grb::set( y, x );
	rc = rc ? rc : grb::set< grb::descriptors::use_index >( x, 0 );

where y on entry equals (0,1,...,n-1), which is also what the above code sets x to while y retains the old values of x.

In other words, the shorter form of the above is std::swap( x, y ), but replacing the above with that raises derails the nonblocking backend. At present, this is the smallest minimal example of the swap failing, though hopefully there are more minimalistic instances to be found to aid debugging.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions