From 497aff571ea390a434e8b9286253cc133203e6b4 Mon Sep 17 00:00:00 2001 From: TiborGY Date: Thu, 30 May 2019 19:23:48 +0200 Subject: [PATCH] upload (2/3) make common functions more flexible, add vector fill function --- cpp_thread_test/cpp_thread_safety_common.h | 29 ++++++++++++++++------ 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/cpp_thread_test/cpp_thread_safety_common.h b/cpp_thread_test/cpp_thread_safety_common.h index 6e2399305..c5b4b312e 100644 --- a/cpp_thread_test/cpp_thread_safety_common.h +++ b/cpp_thread_test/cpp_thread_safety_common.h @@ -5,16 +5,29 @@ inline void pauser(){ std::getline(std::cin, dummy); } -void FillMatrices(std::vector>& matBlock, std::mt19937_64& PRNG, std::uniform_real_distribution& rngdist, const blasint randomMatSize, const uint32_t numConcurrentThreads){ - for(uint32_t i=0; i<3; i++){ +void FillMatrices(std::vector>& matBlock, std::mt19937_64& PRNG, std::uniform_real_distribution& rngdist, const blasint randomMatSize, const uint32_t numConcurrentThreads, const uint32_t numMat){ + for(uint32_t i=0; i>& vecBlock, std::mt19937_64& PRNG, std::uniform_real_distribution& rngdist, const blasint randomMatSize, const uint32_t numConcurrentThreads, const uint32_t numVec){ + for(uint32_t i=0; i>& matBlock, const blasint randomMatSize, const uint32_t numConcurrentThreads){ - for (uint32_t i=0;i>& matBlock, const blasint randomMatSize, const uint32_t numConcurrentThreads, const uint32_t numMat){ + for (uint32_t i=0;i