/* * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #include "BenchUtils.h" #include namespace fbgemm { std::default_random_engine eng; template void randFill(aligned_vector &vec, const int low, const int high) { std::random_device r; std::uniform_int_distribution dis(low, high); for (auto &v : vec) { v = static_cast(dis(eng)); } } template void randFill(aligned_vector &vec, const int low, const int high); template void randFill(aligned_vector &vec, const int low, const int high); template void randFill(aligned_vector &vec, const int low, const int high); template void randFill(aligned_vector &vec, const int low, const int high); void llc_flush(std::vector& llc) { volatile char* data = llc.data(); for (int i = 0; i < llc.size(); i++) { data[i]++; } } } // namespace fbgemm