mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-14 18:33:16 +08:00
Specialize ThreadPoolDevice::enqueueNotification for the case with no args. As an example this reduces binary size of an TensorFlow demo app for Android by about 2.5%.
This commit is contained in:
parent
1b7294f6fc
commit
f349507e02
@ -154,7 +154,11 @@ struct ThreadPoolDevice {
|
||||
|
||||
template <class Function, class... Args>
|
||||
EIGEN_STRONG_INLINE void enqueueNoNotification(Function&& f, Args&&... args) const {
|
||||
pool_->Schedule(std::bind(f, args...));
|
||||
if (sizeof...(args) > 0) {
|
||||
pool_->Schedule(std::bind(f, args...));
|
||||
} else {
|
||||
pool_->Schedule(f);
|
||||
}
|
||||
}
|
||||
|
||||
// Returns a logical thread index between 0 and pool_->NumThreads() - 1 if
|
||||
|
Loading…
x
Reference in New Issue
Block a user