You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
local dataflows can not be lifted into the current namespace via using hpx::lcos::local::dataflow;. adding this using clause give compile errors, even if dataflows later on are called with the full namespace
#include <iostream>
#include <hpx/hpx.hpp>
#include <hpx/hpx_main.hpp>
#include <hpx/lcos/local/dataflow.hpp>
#include <hpx/util/unwrap.hpp>
// the following line causes compile errors
using hpx::lcos::local::dataflow;
typedef hpx::lcos::future< double > future_type;
template< typename Value >
struct mul
{
const Value a;
mul( const Value alpha ) : a( alpha )
{ }
double operator() ( double x1 , double x2 ) const // this has to be const?!
{
return x1*x2*a;
}
};
int main()
{
auto functor = hpx::util::unwrap(mul<double>( 0.5 ));
future_type f1 = hpx::make_ready_future( 1.0 );
// compile error even when using full namespace
future_type f2 = hpx::lcos::local::dataflow( functor , f1 , f1 );
future_type f3 = hpx::lcos::local::dataflow( hpx::util::unwrap(mul<double>( 2.0 )) , f1 , f1 );
return 0;
}
The text was updated successfully, but these errors were encountered:
local dataflows can not be lifted into the current namespace via
using hpx::lcos::local::dataflow;
. adding thisusing
clause give compile errors, even if dataflows later on are called with the full namespaceThe text was updated successfully, but these errors were encountered: