Removed range prints to avoid fmt external dependency

This commit is contained in:
Alejandro Saucedo 2020-11-01 12:19:44 +00:00
parent 5fbf5ee7f5
commit 672c78d290
2 changed files with 10 additions and 17 deletions

View file

@ -1,11 +1,4 @@
#if DEBUG
#if KOMPUTE_ENABLE_SPDLOG
// Only enabled if spdlog is enabled
#include <spdlog/fmt/bundled/ranges.h>
#endif
#endif
#include "kompute/Tensor.hpp"
namespace kp {
@ -20,7 +13,7 @@ Tensor::Tensor(const std::vector<float>& data, TensorTypes tensorType)
{
#if DEBUG
SPDLOG_DEBUG(
"Kompute Tensor constructor data: {}, and type: {}", data, tensorType);
"Kompute Tensor constructor data length: {}, and type: {}", data.size(), tensorType);
#endif
this->mData = data;

View file

@ -1,7 +1,7 @@
#include "gtest/gtest.h"
#include <spdlog/fmt/bundled/ranges.h>
//#include <spdlog/fmt/bundled/ranges.h>
#include "kompute/Kompute.hpp"
TEST(TestLogisticRegressionAlgorithm, TestMainLogisticRegression)
@ -76,10 +76,10 @@ TEST(TestLogisticRegressionAlgorithm, TestMainLogisticRegression)
EXPECT_LT(bIn->data()[0], 0.0);
EXPECT_LT(bIn->data()[0], 0.0);
SPDLOG_WARN("Result wIn: {}, bIn: {}, loss: {}",
wIn->data(),
bIn->data(),
lOut->data());
//SPDLOG_WARN("Result wIn: {}, bIn: {}, loss: {}",
// wIn->data(),
// bIn->data(),
// lOut->data());
}
TEST(TestLogisticRegressionAlgorithm, TestMainLogisticRegressionManualCopy)
@ -158,8 +158,8 @@ TEST(TestLogisticRegressionAlgorithm, TestMainLogisticRegressionManualCopy)
EXPECT_GT(wIn->data()[1], 1.0);
EXPECT_LT(bIn->data()[0], 0.0);
SPDLOG_WARN("Result wIn: {}, bIn: {}, loss: {}",
wIn->data(),
bIn->data(),
lOut->data());
//SPDLOG_WARN("Result wIn: {}, bIn: {}, loss: {}",
// wIn->data(),
// bIn->data(),
// lOut->data());
}