diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2017-03-04 15:21:33 +0100 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2017-03-04 15:21:33 +0100 |
commit | e993ee077b50d3a6134309d465a4174b5c749596 (patch) | |
tree | b967f2702b90d8080a3e3cb41b9cbc01ab9eddc3 /test/correctness/testblas.cpp | |
parent | 3fc73851f7ed885335940eb85e53069638567323 (diff) |
Added a proper data-preparation function for the TRSM tests
Diffstat (limited to 'test/correctness/testblas.cpp')
-rw-r--r-- | test/correctness/testblas.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/correctness/testblas.cpp b/test/correctness/testblas.cpp index 5207c0ab..d959ce18 100644 --- a/test/correctness/testblas.cpp +++ b/test/correctness/testblas.cpp @@ -51,6 +51,7 @@ template <> const std::vector<Transpose> TestBlas<double2,double>::kTransposes = template <typename T, typename U> TestBlas<T,U>::TestBlas(const std::vector<std::string> &arguments, const bool silent, const std::string &name, const std::vector<std::string> &options, + const DataPrepare prepare_data, const Routine run_routine, const Routine run_reference1, const Routine run_reference2, const ResultGet get_result, const ResultIndex get_index, @@ -59,6 +60,7 @@ TestBlas<T,U>::TestBlas(const std::vector<std::string> &arguments, const bool si kOffsets(GetOffsets()), kAlphaValues(GetExampleScalars<U>(full_test_)), kBetaValues(GetExampleScalars<U>(full_test_)), + prepare_data_(prepare_data), run_routine_(run_routine), get_result_(get_result), get_index_(get_index), @@ -112,6 +114,11 @@ void TestBlas<T,U>::TestRegular(std::vector<Arguments<U>> &test_vector, const st std::cout << std::flush; } + // Optionally prepares the input data + prepare_data_(args, queue_, kSeed, + x_source_, y_source_, a_source_, b_source_, c_source_, + ap_source_, scalar_source_); + // Set-up for the CLBlast run auto x_vec2 = Buffer<T>(context_, args.x_size); auto y_vec2 = Buffer<T>(context_, args.y_size); |