diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2017-03-05 11:13:47 +0100 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2017-03-05 11:13:47 +0100 |
commit | 7f14b11f1e240f12f5f6bf93cbbeab26001e9a5c (patch) | |
tree | 1ef26380cac190c11a8eea68b90d05f0593c2738 /test/performance | |
parent | f9a520b3aff7b4eec99d9e11a03f9467e7ab351c (diff) |
Changed the way the test-data is generated: now using a single MT generator and distribution for all data
Diffstat (limited to 'test/performance')
-rw-r--r-- | test/performance/client.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
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 <string> #include <vector> #include <utility> #include <algorithm> #include <chrono> +#include <random> + +#include "utilities/utilities.hpp" +#include "test/performance/client.hpp" namespace clblast { // ================================================================================================= @@ -179,13 +181,15 @@ void Client<T,U>::PerformanceTest(Arguments<U> &args, const SetMetric set_sizes) std::vector<T> c_source(args.c_size); std::vector<T> ap_source(args.ap_size); std::vector<T> 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<double> 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<T>(context, args.x_size); |