mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 20:56:00 +08:00
Fix clang-tidy warning
This commit is contained in:
parent
0cef325b07
commit
86a43d8c04
@ -163,7 +163,7 @@ struct ThreadPoolDevice {
|
|||||||
Notification* n = new Notification();
|
Notification* n = new Notification();
|
||||||
pool_->Schedule(
|
pool_->Schedule(
|
||||||
std::bind(&FunctionWrapperWithNotification<Function, Args...>::run, n,
|
std::bind(&FunctionWrapperWithNotification<Function, Args...>::run, n,
|
||||||
std::move(f), args...));
|
std::forward<Function>(f), args...));
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -172,16 +172,16 @@ struct ThreadPoolDevice {
|
|||||||
Args&&... args) const {
|
Args&&... args) const {
|
||||||
pool_->Schedule(
|
pool_->Schedule(
|
||||||
std::bind(&FunctionWrapperWithBarrier<Function, Args...>::run, b,
|
std::bind(&FunctionWrapperWithBarrier<Function, Args...>::run, b,
|
||||||
std::move(f), args...));
|
std::forward<Function>(f), args...));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Function, class... Args>
|
template <class Function, class... Args>
|
||||||
EIGEN_STRONG_INLINE void enqueueNoNotification(Function&& f,
|
EIGEN_STRONG_INLINE void enqueueNoNotification(Function&& f,
|
||||||
Args&&... args) const {
|
Args&&... args) const {
|
||||||
if (sizeof...(args) > 0) {
|
if (sizeof...(args) > 0) {
|
||||||
pool_->Schedule(std::bind(std::move(f), args...));
|
pool_->Schedule(std::bind(std::forward<Function>(f), args...));
|
||||||
} else {
|
} else {
|
||||||
pool_->Schedule(std::move(f));
|
pool_->Schedule(std::forward<Function>(f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user