mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-03-07 18:27:40 +08:00
Fixed compilation errors with msvc
This commit is contained in:
parent
1d23430628
commit
40c9923a8a
@ -67,8 +67,8 @@ const int TestQueue::kQueueSize;
|
|||||||
static void test_stress_eventcount()
|
static void test_stress_eventcount()
|
||||||
{
|
{
|
||||||
const int kThreads = std::thread::hardware_concurrency();
|
const int kThreads = std::thread::hardware_concurrency();
|
||||||
const int kEvents = 1 << 16;
|
static const int kEvents = 1 << 16;
|
||||||
const int kQueues = 10;
|
static const int kQueues = 10;
|
||||||
|
|
||||||
std::vector<EventCount::Waiter> waiters(kThreads);
|
std::vector<EventCount::Waiter> waiters(kThreads);
|
||||||
EventCount ec(waiters);
|
EventCount ec(waiters);
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
#define EIGEN_USE_THREADS
|
#define EIGEN_USE_THREADS
|
||||||
|
#include <cstdlib>
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include <Eigen/CXX11/ThreadPool>
|
#include <Eigen/CXX11/ThreadPool>
|
||||||
|
|
||||||
@ -138,7 +139,7 @@ void test_empty_runqueue()
|
|||||||
// PopBack. Ensure that we don't crash, deadlock, and all sanity checks pass.
|
// PopBack. Ensure that we don't crash, deadlock, and all sanity checks pass.
|
||||||
void test_stress_runqueue()
|
void test_stress_runqueue()
|
||||||
{
|
{
|
||||||
const int kEvents = 1 << 18;
|
static const int kEvents = 1 << 18;
|
||||||
RunQueue<int, 8> q;
|
RunQueue<int, 8> q;
|
||||||
std::atomic<int> total(0);
|
std::atomic<int> total(0);
|
||||||
std::vector<std::unique_ptr<std::thread>> threads;
|
std::vector<std::unique_ptr<std::thread>> threads;
|
||||||
|
Loading…
Reference in New Issue
Block a user