Skip to content

std::swap for nonblocking vectors is broken #408

@anyzelman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions