summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2017-01-15 17:17:40 +0100
committerCedric Nugteren <web@cedricnugteren.nl>2017-01-15 17:17:40 +0100
commit4a4be0c3a5e603a9c0c4c7aebcb660b5e62b99ad (patch)
treed5a3dff4078d3dfb97f960db7e69fdfdb481061a
parent681a465b355d0fed7a82644f4472a5afa024721e (diff)
Prints additional information in verbose/debug mode
-rw-r--r--src/cache.cpp8
-rw-r--r--test/correctness/testblas.cpp5
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<T,U>::TestRegular(std::vector<Arguments<U>> &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<int>(status2));
+ std::cout << std::flush;
+ }
TestErrorCodes(status2, status2, args);
continue;
}