SWDEV-273235 - catch2 windows build (#2422)

Change-Id: I331c6c2525a65746e2d0799ec8dc2f608af1176a

[ROCm/hip commit: 0d361c5621]
This commit is contained in:
agunashe
2021-11-25 22:22:46 -08:00
committed by GitHub
parent 6a5e1ea51e
commit e90cc323e3
16 changed files with 178 additions and 71 deletions
@@ -23,6 +23,7 @@ THE SOFTWARE.
#pragma once
#include "hip_test_context.hh"
#include <catch.hpp>
#include <stdlib.h>
#define HIP_PRINT_STATUS(status) INFO(hipGetErrorName(status) << " at line: " << __LINE__);
@@ -105,4 +106,13 @@ static inline unsigned setNumBlocks(unsigned blocksPerCU, unsigned threadsPerBlo
return blocks;
}
static inline int RAND_R(unsigned* rand_seed)
{
#if defined(_WIN32) || defined(_WIN64)
srand(*rand_seed);
return rand();
#else
return rand_r(rand_seed);
#endif
}
}