diff options
-rw-r--r-- | SConscript | 6 | ||||
-rw-r--r-- | arm_compute/core/Log.h | 4 | ||||
-rw-r--r-- | arm_compute/core/Utils.h | 2 | ||||
-rw-r--r-- | arm_compute/graph/Logger.h | 4 | ||||
-rw-r--r-- | src/core/ITensor.cpp | 2 | ||||
-rw-r--r-- | src/core/Utils.cpp | 2 |
6 files changed, 19 insertions, 1 deletions
diff --git a/SConscript b/SConscript index 7d0717b27e..2dd9b385c0 100644 --- a/SConscript +++ b/SConscript @@ -161,7 +161,11 @@ arm_compute_env.Append(LIBS = ['dl']) core_files = Glob('src/core/*.cpp') core_files += Glob('src/core/CPP/*.cpp') core_files += Glob('src/core/CPP/kernels/*.cpp') -core_files += Glob('src/core/utils/*/*.cpp') +core_files += Glob('src/core/utils/helpers/*.cpp') +core_files += Glob('src/core/utils/io/*.cpp') +core_files += Glob('src/core/utils/quantization/*.cpp') +if env["logging"]: + core_files += Glob('src/core/utils/logging/*.cpp') runtime_files = Glob('src/runtime/*.cpp') runtime_files += Glob('src/runtime/CPP/ICPPSimpleFunction.cpp') diff --git a/arm_compute/core/Log.h b/arm_compute/core/Log.h index 70e7c51110..2d8d396459 100644 --- a/arm_compute/core/Log.h +++ b/arm_compute/core/Log.h @@ -26,6 +26,7 @@ #include "arm_compute/core/utils/logging/Macros.h" +#ifdef ARM_COMPUTE_LOGGING_ENABLED /** Create a default core logger * * @note It will eventually create all default loggers in don't exist @@ -38,6 +39,9 @@ arm_compute::logging::LoggerRegistry::get().create_reserved_loggers(); \ } \ } while(false) +#else /* ARM_COMPUTE_LOGGING_ENABLED */ +#define ARM_COMPUTE_CREATE_DEFAULT_CORE_LOGGER() +#endif /* ARM_COMPUTE_LOGGING_ENABLED */ /** Log a message to the core system logger * diff --git a/arm_compute/core/Utils.h b/arm_compute/core/Utils.h index f1395a40d9..7c5d87f475 100644 --- a/arm_compute/core/Utils.h +++ b/arm_compute/core/Utils.h @@ -1024,6 +1024,7 @@ inline std::string float_to_string_with_full_precision(float val) return ss.str(); } +#ifdef ARM_COMPUTE_DEBUG_ENABLED /** Print consecutive elements to an output stream. * * @param[out] s Output stream to print the elements to. @@ -1112,5 +1113,6 @@ void print_consecutive_elements(std::ostream &s, DataType dt, const uint8_t *ptr * @return The maximum width of the elements. */ int max_consecutive_elements_display_width(std::ostream &s, DataType dt, const uint8_t *ptr, unsigned int n); +#endif /* ARM_COMPUTE_DEBUG_ENABLED */ } #endif /*__ARM_COMPUTE_UTILS_H__ */ diff --git a/arm_compute/graph/Logger.h b/arm_compute/graph/Logger.h index 8b87f47b3d..8946d82a51 100644 --- a/arm_compute/graph/Logger.h +++ b/arm_compute/graph/Logger.h @@ -26,6 +26,7 @@ #include "arm_compute/core/utils/logging/Macros.h" +#ifdef ARM_COMPUTE_LOGGING_ENABLED /** Create a default core logger * * @note It will eventually create all default loggers in don't exist @@ -38,6 +39,9 @@ arm_compute::logging::LoggerRegistry::get().create_reserved_loggers(); \ } \ } while(false) +#else /* ARM_COMPUTE_LOGGING_ENABLED */ +#define ARM_COMPUTE_CREATE_DEFAULT_GRAPH_LOGGER() +#endif /* ARM_COMPUTE_LOGGING_ENABLED */ #define ARM_COMPUTE_LOG_GRAPH(log_level, x) \ ARM_COMPUTE_CREATE_DEFAULT_GRAPH_LOGGER(); \ diff --git a/src/core/ITensor.cpp b/src/core/ITensor.cpp index 3dffcd016d..31359c60fe 100644 --- a/src/core/ITensor.cpp +++ b/src/core/ITensor.cpp @@ -71,6 +71,7 @@ void ITensor::copy_from(const ITensor &src) src_it, dst_it); } +#ifdef ARM_COMPUTE_DEBUG_ENABLED void ITensor::print(std::ostream &s, IOFormatInfo io_fmt) const { ARM_COMPUTE_ERROR_ON(this->buffer() == nullptr); @@ -151,6 +152,7 @@ void ITensor::print(std::ostream &s, IOFormatInfo io_fmt) const } } } +#endif /* ARM_COMPUTE_DEBUG_ENABLED */ bool ITensor::is_used() const { diff --git a/src/core/Utils.cpp b/src/core/Utils.cpp index 6080dc45ba..7223368a7e 100644 --- a/src/core/Utils.cpp +++ b/src/core/Utils.cpp @@ -395,6 +395,7 @@ const std::pair<unsigned int, unsigned int> arm_compute::scaled_dimensions(unsig return std::make_pair(w, h); } +#ifdef ARM_COMPUTE_DEBUG_ENABLED void arm_compute::print_consecutive_elements(std::ostream &s, DataType dt, const uint8_t *ptr, unsigned int n, int stream_width, const std::string &element_delim) { switch(dt) @@ -455,3 +456,4 @@ int arm_compute::max_consecutive_elements_display_width(std::ostream &s, DataTyp } return 0; } +#endif /* ARM_COMPUTE_DEBUG_ENABLED */ |