From 4a4be0c3a5e603a9c0c4c7aebcb660b5e62b99ad Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Sun, 15 Jan 2017 17:17:40 +0100 Subject: Prints additional information in verbose/debug mode --- src/cache.cpp | 8 ++++---- test/correctness/testblas.cpp | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/cache.cpp b/src/cache.cpp index 6786eaa2..a2e51792 100644 --- a/src/cache.cpp +++ b/src/cache.cpp @@ -24,7 +24,7 @@ namespace clblast { void StoreBinaryToCache(const std::string &binary, const std::string &device_name, const Precision &precision, const std::string &routine_name) { #ifdef VERBOSE - printf("[DEBUG] Storing binary in cache\n"); + printf("[DEBUG] Storing binary '%s' in cache\n", routine_name.c_str()); #endif binary_cache_mutex_.lock(); binary_cache_.push_back(BinaryCache{binary, device_name, precision, routine_name}); @@ -35,7 +35,7 @@ void StoreBinaryToCache(const std::string &binary, const std::string &device_nam void StoreProgramToCache(const Program &program, const Context &context, const Precision &precision, const std::string &routine_name) { #ifdef VERBOSE - printf("[DEBUG] Storing program in cache\n"); + printf("[DEBUG] Storing program '%s' in cache\n", routine_name.c_str()); #endif program_cache_mutex_.lock(); program_cache_.push_back(ProgramCache{program, context(), precision, routine_name}); @@ -47,7 +47,7 @@ void StoreProgramToCache(const Program &program, const Context &context, const std::string& GetBinaryFromCache(const std::string &device_name, const Precision &precision, const std::string &routine_name) { #ifdef VERBOSE - printf("[DEBUG] Retrieving binary from cache\n"); + printf("[DEBUG] Retrieving binary '%s' from cache\n", routine_name.c_str()); #endif binary_cache_mutex_.lock(); for (auto &cached_binary: binary_cache_) { @@ -65,7 +65,7 @@ const std::string& GetBinaryFromCache(const std::string &device_name, const Prec const Program& GetProgramFromCache(const Context &context, const Precision &precision, const std::string &routine_name) { #ifdef VERBOSE - printf("[DEBUG] Retrieving program from cache\n"); + printf("[DEBUG] Retrieving program '%s' from cache\n", routine_name.c_str()); #endif program_cache_mutex_.lock(); for (auto &cached_program: program_cache_) { diff --git a/test/correctness/testblas.cpp b/test/correctness/testblas.cpp index 5fddb37b..7c64855a 100644 --- a/test/correctness/testblas.cpp +++ b/test/correctness/testblas.cpp @@ -138,7 +138,10 @@ void TestBlas::TestRegular(std::vector> &test_vector, const st // Don't continue with CBLAS if there are incorrect parameters if (compare_cblas_ && status2 != StatusCode::kSuccess) { - if (verbose_) { fprintf(stdout, " -> "); std::cout << std::flush; } + if (verbose_) { + fprintf(stdout, " -> %d -> ", static_cast(status2)); + std::cout << std::flush; + } TestErrorCodes(status2, status2, args); continue; } -- cgit v1.2.3