I successfully parallelized some work with non-static member function in QtConcurrent::run(). I am now trying to implement parallelized work with a static member function. I have a Random class, and I want to call rand(double,double) static function on one precise instance: it is a random number generator, and I want to run the thread calling runif on a newly seeded generator. I tried this here (class solveParallel is a simple class where I have a runRandom() and resultRandom() function, calling QtConcurent::run and Qfuture::result() respectively):
void solverParallelData::runRandom(const double& d1, const double& d2)
{
futureRandom = QtConcurrent::run(Random::rand,this->m_generator, d1, d2);
}
and compilation error is "cannot deduce template argument as function argument is ambiguous": : any clue?
Thanks and regards.