mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-21 04:14:26 +08:00
Add synchronize method to all devices.
This commit is contained in:
parent
b7551bff92
commit
551eebc8ca
@ -95,6 +95,10 @@ struct DefaultDevice {
|
|||||||
return firstLevelCacheSize();
|
return firstLevelCacheSize();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void synchronize() const {
|
||||||
|
// Nothing. Default device operations are synchronous.
|
||||||
|
}
|
||||||
|
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE int majorDeviceVersion() const {
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE int majorDeviceVersion() const {
|
||||||
#if !defined(EIGEN_GPU_COMPILE_PHASE)
|
#if !defined(EIGEN_GPU_COMPILE_PHASE)
|
||||||
|
@ -147,6 +147,10 @@ struct ThreadPoolDevice {
|
|||||||
// The l3 cache size is shared between all the cores.
|
// The l3 cache size is shared between all the cores.
|
||||||
return l3CacheSize() / num_threads_;
|
return l3CacheSize() / num_threads_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void synchronize() const {
|
||||||
|
// Nothing. Threadpool device operations are synchronous.
|
||||||
|
}
|
||||||
|
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE int majorDeviceVersion() const {
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE int majorDeviceVersion() const {
|
||||||
// Should return an enum that encodes the ISA supported by the CPU
|
// Should return an enum that encodes the ISA supported by the CPU
|
||||||
|
Loading…
x
Reference in New Issue
Block a user