diff options
author | CNugteren <web@cedricnugteren.nl> | 2015-06-26 08:10:23 +0200 |
---|---|---|
committer | CNugteren <web@cedricnugteren.nl> | 2015-06-26 08:10:23 +0200 |
commit | 75f263ce3aa35f57115670af18719137b3020e79 (patch) | |
tree | 1d584c03bc3514018ec6da8619d9770cf98126f8 /test/performance/client.cc | |
parent | ff9f9fac57b550d4a8834a5e5b344c2eefa9099f (diff) |
Added symmetric matrix support for the ABC performance tester
Diffstat (limited to 'test/performance/client.cc')
-rw-r--r-- | test/performance/client.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/test/performance/client.cc b/test/performance/client.cc index 65ff3218..b089f925 100644 --- a/test/performance/client.cc +++ b/test/performance/client.cc @@ -239,14 +239,15 @@ template void ClientAC<double2>(int, char **, Routine2<double2>, const std::vect // This is the matrix-matrix-matrix variant of the set-up/tear-down client routine. template <typename T> void ClientABC(int argc, char *argv[], Routine3<T> client_routine, - const std::vector<std::string> &options) { + const std::vector<std::string> &options, const bool symmetric) { // Function to determine how to find the default value of the leading dimension of matrix A - auto default_ld_a = [](const Arguments<T> args) { return args.m; }; + auto default_ld_a = [&symmetric](const Arguments<T> args) { return (symmetric) ? args.n : args.m; }; // Simple command line argument parser with defaults auto args = ParseArguments<T>(argc, argv, options, default_ld_a); if (args.print_help) { return; } + if (symmetric) { args.m = args.n; } // Prints the header of the output table PrintTableHeader(args.silent, options); @@ -314,10 +315,10 @@ void ClientABC(int argc, char *argv[], Routine3<T> client_routine, } // Compiles the above function -template void ClientABC<float>(int, char **, Routine3<float>, const std::vector<std::string>&); -template void ClientABC<double>(int, char **, Routine3<double>, const std::vector<std::string>&); -template void ClientABC<float2>(int, char **, Routine3<float2>, const std::vector<std::string>&); -template void ClientABC<double2>(int, char **, Routine3<double2>, const std::vector<std::string>&); +template void ClientABC<float>(int, char **, Routine3<float>, const std::vector<std::string>&, const bool); +template void ClientABC<double>(int, char **, Routine3<double>, const std::vector<std::string>&, const bool); +template void ClientABC<float2>(int, char **, Routine3<float2>, const std::vector<std::string>&, const bool); +template void ClientABC<double2>(int, char **, Routine3<double2>, const std::vector<std::string>&, const bool); // ================================================================================================= |