[GiNaC-list] ex thread safe?
Zhao Li
zhaoli at ihep.ac.cn
Fri Sep 23 00:10:33 CEST 2016
We are trying to implement the GiNaC calculation in multi-thread by using functor,
auto func = [](void)->void {…};
However we found that (pointer) problem arises if the arguments are passed by reference.
auto func = [&](void)->void {…};
But it seems okay to pass by value.
auto func = [=](void)->void {…};
We were wondering if it is really okay to pass by value, or we have to transfer GiNaC::ex into string as argument. And we do not understand why passing by reference is not okay.
Cheers,
Zhao
More information about the GiNaC-list
mailing list