* Legacy benchmark_app is added * apply fix for supporting multiple -i arguments * new CMakeLists.txt with OpenCV auto detection * fixes * docs * docs2 * Docs changes * docs * CMakeLists.txt modification * Update tools/legacy/benchmark_app/README.md Co-authored-by: ivikhrev <ivan.vikhrev@intel.com> Co-authored-by: Vladimir Dudnik <vladimir.dudnik@intel.com>
33 lines
820 B
C++
33 lines
820 B
C++
// Copyright (C) 2018-2021 Intel Corporation
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
#include "slog.hpp"
|
|
|
|
#include <iostream>
|
|
|
|
namespace slog {
|
|
|
|
LogStream info("INFO", std::cout);
|
|
LogStream warn("WARNING", std::cout);
|
|
LogStream err("ERROR", std::cerr);
|
|
|
|
LogStream::LogStream(const std::string& prefix, std::ostream& log_stream): _prefix(prefix), _new_line(true) {
|
|
_log_stream = &log_stream;
|
|
}
|
|
|
|
// Specializing for LogStreamEndLine to support slog::endl
|
|
LogStream& LogStream::operator<<(const LogStreamEndLine& /*arg*/) {
|
|
_new_line = true;
|
|
|
|
(*_log_stream) << std::endl;
|
|
return *this;
|
|
}
|
|
|
|
// Specializing for LogStreamBoolAlpha to support slog::boolalpha
|
|
LogStream& LogStream::operator<<(const LogStreamBoolAlpha& /*arg*/) {
|
|
(*_log_stream) << std::boolalpha;
|
|
return *this;
|
|
}
|
|
|
|
} // namespace slog
|