MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST

Function TEST

tensorflow/core/lib/random/simple_philox_test.cc:29–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27namespace {
28
29TEST(SimplePhiloxTest, FloatTest) {
30 PhiloxRandom philox(7, 7);
31 SimplePhilox gen(&philox);
32 static const int kIters = 1000000;
33 for (int i = 0; i < kIters; ++i) {
34 float f = gen.RandFloat();
35 EXPECT_LE(0.0f, f);
36 EXPECT_GT(1.0f, f);
37 }
38 for (int i = 0; i < kIters; ++i) {
39 double d = gen.RandDouble();
40 EXPECT_LE(0.0, d);
41 EXPECT_GT(1.0, d);
42 }
43}
44
45static void DifferenceTest(const char *names, SimplePhilox *gen1,
46 SimplePhilox *gen2) {

Callers

nothing calls this directly

Calls 8

DifferenceTestFunction · 0.85
RandFloatMethod · 0.80
RandDoubleMethod · 0.80
Rand32Method · 0.80
UniformMethod · 0.80
Uniform64Method · 0.80
insertMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected