mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-26 08:13:13 +08:00
Fixed a few typos
This commit is contained in:
parent
5b1106c56b
commit
04f954956d
@ -16,12 +16,12 @@
|
|||||||
// implementation of rand() is already thread safe
|
// implementation of rand() is already thread safe
|
||||||
int rand_reentrant(unsigned int* s) {
|
int rand_reentrant(unsigned int* s) {
|
||||||
#ifdef EIGEN_COMP_MSVC_STRICT
|
#ifdef EIGEN_COMP_MSVC_STRICT
|
||||||
|
EIGEN_UNUSED_VARIABLE(s);
|
||||||
return rand();
|
return rand();
|
||||||
#else
|
#else
|
||||||
return rand_r(s);
|
return rand_r(s);
|
||||||
endif
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
static void test_basic_eventcount()
|
static void test_basic_eventcount()
|
||||||
{
|
{
|
||||||
@ -106,7 +106,7 @@ static void test_stress_eventcount()
|
|||||||
consumers.emplace_back(new std::thread([&ec, &queues, &waiters, i]() {
|
consumers.emplace_back(new std::thread([&ec, &queues, &waiters, i]() {
|
||||||
EventCount::Waiter& w = waiters[i];
|
EventCount::Waiter& w = waiters[i];
|
||||||
unsigned int rnd = static_cast<unsigned int>(std::hash<std::thread::id>()(std::this_thread::get_id()));
|
unsigned int rnd = static_cast<unsigned int>(std::hash<std::thread::id>()(std::this_thread::get_id()));
|
||||||
for (int j = 0; j < kEvents; k++) {
|
for (int j = 0; j < kEvents; j++) {
|
||||||
unsigned idx = rand_reentrant(&rnd) % kQueues;
|
unsigned idx = rand_reentrant(&rnd) % kQueues;
|
||||||
if (queues[idx].Pop()) continue;
|
if (queues[idx].Pop()) continue;
|
||||||
j--;
|
j--;
|
||||||
|
@ -18,12 +18,12 @@
|
|||||||
// implementation of rand() is already thread safe
|
// implementation of rand() is already thread safe
|
||||||
int rand_reentrant(unsigned int* s) {
|
int rand_reentrant(unsigned int* s) {
|
||||||
#ifdef EIGEN_COMP_MSVC_STRICT
|
#ifdef EIGEN_COMP_MSVC_STRICT
|
||||||
|
EIGEN_UNUSED_VARIABLE(s);
|
||||||
return rand();
|
return rand();
|
||||||
#else
|
#else
|
||||||
return rand_r(s);
|
return rand_r(s);
|
||||||
endif
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void test_basic_runqueue()
|
void test_basic_runqueue()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user