Skip to content

Commit

Permalink
revert mutex+lock_guard on mt19937
Browse files Browse the repository at this point in the history
  • Loading branch information
franz committed Nov 3, 2023
1 parent bbc25e7 commit 0b8cac8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions test_common/harness/mt19937.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
#include "mingw_compat.h"
#include "harness/alloc.h"

#include <mutex>
#ifdef __SSE2__
#include <mutex>
#include <emmintrin.h>
#endif

Expand All @@ -62,8 +62,6 @@
#define UPPER_MASK (cl_uint)0x80000000UL /* most significant w-r bits */
#define LOWER_MASK (cl_uint)0x7fffffffUL /* least significant r bits */

static std::mutex Mt19937Mtx;

typedef struct _MTdata
{
cl_uint mt[N];
Expand Down Expand Up @@ -107,7 +105,6 @@ void free_mtdata(MTdata d)
/* generates a random number on [0,0xffffffff]-interval */
cl_uint genrand_int32(MTdata d)
{
std::lock_guard<std::mutex> LockGuard(Mt19937Mtx);
/* mag01[x] = x * MATRIX_A for x=0,1 */
static const cl_uint mag01[2] = { 0x0UL, MATRIX_A };
#ifdef __SSE2__
Expand Down

0 comments on commit 0b8cac8

Please sign in to comment.