Skip to content

Commit

Permalink
up namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentchabannes committed Feb 7, 2024
1 parent b6d4f76 commit 52f798a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions examples/ex1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ auto makeSpData( std::tuple<T...>& t ){
}
}

namespace pm
namespace Frontend
{
template <typename ... Ts>
void
Expand All @@ -103,19 +103,19 @@ int main()
double d1=2.34;

// use variables state (if non const -> SpWrite else SpRead).
pm::runTask( _parameters=pm::parameters(i1,d1),
_task=[](int p1,double & p2){
p2 *= p1;
} );
Frontend::runTask( _parameters=Frontend::parameters(i1,d1),
_task=[](int p1,double & p2){
p2 *= p1;
} );
std::cout << "d1="<< d1 << std::endl;

// use std::ref/std::cref (if non const -> SpWrite else SpRead).
int i2 = 123;
std::string s2 = "string value : ";
pm::runTask( _parameters=pm::parameters(std::cref(i2),std::ref(s2)),
_task=[](int p1,std::string & p2){
p2 += std::to_string(p1);
} );
Frontend::runTask( _parameters=Frontend::parameters(std::cref(i2),std::ref(s2)),
_task=[](int p1,std::string & p2){
p2 += std::to_string(p1);
} );
std::cout << "s2="<< s2 << std::endl;

return 0;
Expand Down

0 comments on commit 52f798a

Please sign in to comment.