// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

#ifndef EIGEN_THREADPOOL_MODULE_H
#define EIGEN_THREADPOOL_MODULE_H

#include "Core"

#include "src/Core/util/DisableStupidWarnings.h"

/** \defgroup ThreadPool_Module ThreadPool Module
 *
 * This module provides 2 threadpool implementations
 *  - a simple reference implementation
 *  - a faster non blocking implementation
 *
 * \code
 * #include <Eigen/ThreadPool>
 * \endcode
 */

#include <cstddef>
#include <cstring>
#include <time.h>

#include <vector>
#include <atomic>
#include <condition_variable>
#include <deque>
#include <mutex>
#include <thread>
#include <functional>
#include <memory>
#include <utility>

// There are non-parenthesized calls to "max" in the  <unordered_map> header,
// which trigger a check in test/main.h causing compilation to fail.
// We work around the check here by removing the check for max in
// the case where we have to emulate thread_local.
#ifdef max
#undef max
#endif
#include <unordered_map>

#include "src/Core/util/Meta.h"
#include "src/Core/util/MaxSizeVector.h"

// Use ABSL synchronization primitives, unless it's explicitly disabled with
// EIGEN_USE_STD_SYNCHRONIZATION for platforms that can't compile ABSL headers
#if !defined(EIGEN_USE_STD_SYNCHRONIZATION)
#include "third_party/absl/base/thread_annotations.h"
#include "third_party/absl/synchronization/mutex.h"
#else
#define EIGEN_MUTEX std::mutex
#define EIGEN_MUTEX_LOCK std::unique_lock<std::mutex>
#define EIGEN_CONDVAR std::condition_variable
#endif

#ifndef EIGEN_MUTEX
namespace Eigen {
struct ABSL_LOCKABLE Mutex {
  absl::Mutex mu;
};
} // namespace Eigen

#define EIGEN_MUTEX ::Eigen::Mutex
#endif

#ifndef EIGEN_MUTEX_LOCK
namespace Eigen {
struct ABSL_SCOPED_LOCKABLE MutexLock {
  explicit MutexLock(Mutex& mutex) ABSL_EXCLUSIVE_LOCK_FUNCTION(mutex)
      : mu(&mutex.mu), lock(mu) {}
  ~MutexLock() ABSL_UNLOCK_FUNCTION() = default;
  absl::Mutex* mu;
  absl::MutexLock lock;
};
} // namespace Eigen

#define EIGEN_MUTEX_LOCK ::Eigen::MutexLock
#endif

#ifndef EIGEN_CONDVAR
namespace Eigen {
struct CondVar {
  void wait(MutexLock& lock) { cv.Wait(lock.mu); }
  void notify_one() { cv.Signal(); }
  void notify_all() { cv.SignalAll(); }
  absl::CondVar cv;
};
} // namespace Eigen

#define EIGEN_CONDVAR ::Eigen::CondVar
#endif

// IWYU pragma: begin_exports
#include "src/ThreadPool/ThreadLocal.h"
#include "src/ThreadPool/ThreadYield.h"
#include "src/ThreadPool/ThreadCancel.h"
#include "src/ThreadPool/EventCount.h"
#include "src/ThreadPool/RunQueue.h"
#include "src/ThreadPool/ThreadPoolInterface.h"
#include "src/ThreadPool/ThreadEnvironment.h"
#include "src/ThreadPool/Barrier.h"
#include "src/ThreadPool/NonBlockingThreadPool.h"
#include "src/ThreadPool/CoreThreadPoolDevice.h"
// IWYU pragma: end_exports

#include "src/Core/util/ReenableStupidWarnings.h"

#endif  // EIGEN_CXX11_THREADPOOL_MODULE_H
