chromium/v8/src/base/utils/random-number-generator.cc

// Copyright 2013 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "src/base/utils/random-number-generator.h"

#include <stdio.h>
#include <stdlib.h>
#if defined(V8_OS_STARBOARD)
#include "starboard/system.h"
#endif  //  V8_OS_STARBOARD

#include <algorithm>
#include <new>

#include "src/base/bits.h"
#include "src/base/macros.h"
#include "src/base/platform/mutex.h"
#include "src/base/platform/time.h"
#include "src/base/platform/wrappers.h"

namespace v8 {
namespace base {

static LazyMutex entropy_mutex =;
static RandomNumberGenerator::EntropySource entropy_source =;

// static
void RandomNumberGenerator::SetEntropySource(EntropySource source) {}


RandomNumberGenerator::RandomNumberGenerator() {}


int RandomNumberGenerator::NextInt(int max) {}


double RandomNumberGenerator::NextDouble() {}


int64_t RandomNumberGenerator::NextInt64() {}


void RandomNumberGenerator::NextBytes(void* buffer, size_t buflen) {}

static std::vector<uint64_t> ComplementSample(
    const std::unordered_set<uint64_t>& set, uint64_t max) {}

std::vector<uint64_t> RandomNumberGenerator::NextSample(uint64_t max,
                                                        size_t n) {}

std::vector<uint64_t> RandomNumberGenerator::NextSampleSlow(
    uint64_t max, size_t n, const std::unordered_set<uint64_t>& excluded) {}

int RandomNumberGenerator::Next(int bits) {}


void RandomNumberGenerator::SetSeed(int64_t seed) {}


uint64_t RandomNumberGenerator::MurmurHash3(uint64_t h) {}

}  // namespace base
}  // namespace v8