Merged eigen/eigen into default

This commit is contained in:
Benoit Steiner
2016-12-14 17:32:16 -08:00
24 changed files with 231 additions and 95 deletions

View File

@@ -418,7 +418,7 @@ class TensorContractionSubMapper {
return m_base_mapper.template loadHalfPacket<Alignment>(i + m_vert_offset, m_horiz_offset);
}
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void storePacket(Index i, Packet p) const {
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void storePacket(Index i, const Packet& p) const {
if (UseDirectOffsets) {
m_base_mapper.storePacket(i, 0, p);
}

View File

@@ -88,11 +88,7 @@ static void initializeDeviceProp() {
#if __cplusplus >= 201103L
std::atomic_thread_fence(std::memory_order_acquire);
#endif
#if EIGEN_OS_WIN || EIGEN_OS_WIN64
Sleep(1000);
#else
sleep(1);
#endif
EIGEN_SLEEP(1000);
}
}
}

View File

@@ -12,17 +12,6 @@
namespace Eigen {
// Use the SimpleThreadPool by default. We'll switch to the new non blocking
// thread pool later.
#ifndef EIGEN_USE_SIMPLE_THREAD_POOL
template <typename Env> using ThreadPoolTempl = NonBlockingThreadPoolTempl<Env>;
typedef NonBlockingThreadPool ThreadPool;
#else
template <typename Env> using ThreadPoolTempl = SimpleThreadPoolTempl<Env>;
typedef SimpleThreadPool ThreadPool;
#endif
// Barrier is an object that allows one or more threads to wait until
// Notify has been called a specified number of times.
class Barrier {

View File

@@ -51,4 +51,12 @@
#endif
#if EIGEN_OS_WIN || EIGEN_OS_WIN64
#define EIGEN_SLEEP(n) Sleep(n)
#elif EIGEN_OS_GNULINUX
#define EIGEN_SLEEP(n) usleep(n * 1000);
#else
#define EIGEN_SLEEP(n) sleep(std::max<unsigned>(1, n/1000))
#endif
#endif