The following code snippet:
grb::Vector< int > x( n ), y( n );
for(size_t i = n; i > 0 ; --i ){
grb::setElement( y, i-1, i-1 );
}
grb::setElement( x, 2, 1 );
grb::setElement( x, 1, 4 );
grb::wait();
int res = 0;
for(size_t i = 0; i < 3; ++i ){
grb::dot( res, x, y, ring );
grb::wait();
std::cout << res << std::endl;
}
grb::wait();
There is an abundance of wait to hopefully avoid unexpected effects of the lazy evaluation.
Compiling and running with the reference backend we get, as expected:
With the nonblocking backend I get:
Is this a bug or am I missing something?