Helper routine for updating the global Eigen thread count used for OpenMP.
| 40 | |
| 41 | // Helper routine for updating the global Eigen thread count used for OpenMP. |
| 42 | void SetEigenNbThreads(int threads) { |
| 43 | #if defined(EIGEN_HAS_OPENMP) |
| 44 | // The global Eigen thread count is only used when OpenMP is enabled. As this |
| 45 | // call causes problems with tsan, make it only when OpenMP is available. |
| 46 | Eigen::setNbThreads(threads); |
| 47 | #endif // defined(EIGEN_HAS_OPENMP) |
| 48 | } |
| 49 | |
| 50 | // We have a single global threadpool for all convolution operations. This means |
| 51 | // that inferences started from different threads may block each other, but |
no outgoing calls
no test coverage detected