Skip to content

Commit

Permalink
Add missing file
Browse files Browse the repository at this point in the history
  • Loading branch information
koparasy committed Jun 7, 2024
1 parent 8cfafc4 commit bb03ecf
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/AMSlib/wf/utils.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright 2021-2023 Lawrence Livermore National Security, LLC and other
* AMSLib Project Developers
*
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*/

#include "wf/utils.hpp"

void random_uq_host(bool *uq_flags, int ndata, double acceptable_error)
{

for (int i = 0; i < ndata; i++) {
uq_flags[i] = ((double)rand() / RAND_MAX) <= acceptable_error;
}
}

0 comments on commit bb03ecf

Please sign in to comment.