From f3fb413a1370d543197fcac61132c6e5ea116a69 Mon Sep 17 00:00:00 2001 From: Krishna Vedala <7001608+kvedala@users.noreply.github.com> Date: Mon, 8 Jun 2020 19:47:30 -0400 Subject: [PATCH] use std::rand for thread safety Signed-off-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com> --- numerical_methods/lu_decompose.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numerical_methods/lu_decompose.cpp b/numerical_methods/lu_decompose.cpp index 37a011e40..a0a2d00ab 100644 --- a/numerical_methods/lu_decompose.cpp +++ b/numerical_methods/lu_decompose.cpp @@ -109,7 +109,7 @@ int main(int argc, char **argv) { U[i] = std::vector(mat_size); for (int j = 0; j < mat_size; j++) /* create random values in the limits [-range2, range-1] */ - A[i][j] = static_cast(rand() % range - range2); + A[i][j] = static_cast(std::rand() % range - range2); } std::clock_t start_t = std::clock();