Incorporate Threadpool in Eigen Core
Reference issue
What does this implement/fix?
Fixes #1044 (closed)
ThreadPool pool(2);
CoreThreadPoolDevice device(pool);
VectorXd a;
VectorXd b;
b.device(device) += a.cwiseAbs2().cwiseSqrt();
b.device(device).noalias() += a.cwiseAbs2().cwiseSqrt(); // useful for matrix products
// backwards compatibility
struct NonSupportedDevice{};
NonSupportedDevice otherDevice;
b.device(otherDevice) += a.cwiseAbs2().cwiseSqrt(); // still works (uses default eigen evaluators)
Additional information
Edited by Charles Schlosser