I am using the Parallel Pattern Library. The class combinable plays the role of reduction clause in openMP, and enables to merge results from parallel calculations.

Does .combine(max()) exists (btw, could you point at some ref with allowed operations with combine, did not find that)?

Thanks and regards.

有帮助吗?

解决方案

Yes, you can pass std::max to combineable::combine, one thing you have to take into account when passing template functions as predicates is that you have to explicitly name the type:

combineable<T> max;

// .. do processing

max.combine(std::max<T>);

You can find all the official MSDN docs about combine (and all the other PPL stuff) here.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top