From 7f14b11f1e240f12f5f6bf93cbbeab26001e9a5c Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Sun, 5 Mar 2017 11:13:47 +0100 Subject: Changed the way the test-data is generated: now using a single MT generator and distribution for all data --- test/performance/client.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'test/performance') diff --git a/test/performance/client.cpp b/test/performance/client.cpp index 2c45b35e..16b44b5a 100644 --- a/test/performance/client.cpp +++ b/test/performance/client.cpp @@ -11,13 +11,15 @@ // // ================================================================================================= -#include "test/performance/client.hpp" - #include #include #include #include #include +#include + +#include "utilities/utilities.hpp" +#include "test/performance/client.hpp" namespace clblast { // ================================================================================================= @@ -179,13 +181,15 @@ void Client::PerformanceTest(Arguments &args, const SetMetric set_sizes) std::vector c_source(args.c_size); std::vector ap_source(args.ap_size); std::vector scalar_source(args.scalar_size); - PopulateVector(x_source, kSeed); - PopulateVector(y_source, kSeed); - PopulateVector(a_source, kSeed); - PopulateVector(b_source, kSeed); - PopulateVector(c_source, kSeed); - PopulateVector(ap_source, kSeed); - PopulateVector(scalar_source, kSeed); + std::mt19937 mt(kSeed); + std::uniform_real_distribution dist(kTestDataLowerLimit, kTestDataUpperLimit); + PopulateVector(x_source, mt, dist); + PopulateVector(y_source, mt, dist); + PopulateVector(a_source, mt, dist); + PopulateVector(b_source, mt, dist); + PopulateVector(c_source, mt, dist); + PopulateVector(ap_source, mt, dist); + PopulateVector(scalar_source, mt, dist); // Creates the matrices on the device auto x_vec = Buffer(context, args.x_size); -- cgit v1.2.3