Some c++11 code doing parallel execution:
*
void f(vector<double>&);
struct F {
vector<double>& v;
F(vector<double>& vv) :v{vv} { }
void operator()();
};
int main()
{
std::thread t1{std::bind(f,some_vec)}; //*f(some_vec) executes
in separate thread*
std::thread t2{F(some_vec)}; //*F(some_vec)()
executes in separate thread*
t1.join();
t2.join();
}
*
*-Michael*
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel