From edc21e44313edea693700a6bdfa353edcfbe25be Mon Sep 17 00:00:00 2001 From: giuros01 Date: Fri, 16 Nov 2018 14:45:31 +0000 Subject: COMPMID-1912: Print functions should be enabled in assert mode Change-Id: Ic7c4b703bd5de73275ae6352a787969e6de55520 Reviewed-on: https://review.mlplatform.org/600 Tested-by: Arm Jenkins Reviewed-by: Michalis Spyrou --- arm_compute/core/Utils.h | 4 ++-- src/core/ITensor.cpp | 6 +++--- src/core/Utils.cpp | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arm_compute/core/Utils.h b/arm_compute/core/Utils.h index 44974f1ecc..816999db51 100644 --- a/arm_compute/core/Utils.h +++ b/arm_compute/core/Utils.h @@ -1104,7 +1104,7 @@ bool check_value_range(T val, DataType dt, QuantizationInfo quant_info = Quantiz } } -#ifdef ARM_COMPUTE_DEBUG_ENABLED +#ifdef ARM_COMPUTE_ASSERTS_ENABLED /** Print consecutive elements to an output stream. * * @param[out] s Output stream to print the elements to. @@ -1193,6 +1193,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_ASSERTS_ENABLED */ } #endif /*__ARM_COMPUTE_UTILS_H__ */ diff --git a/src/core/ITensor.cpp b/src/core/ITensor.cpp index 31359c60fe..e6c80e8879 100644 --- a/src/core/ITensor.cpp +++ b/src/core/ITensor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 ARM Limited. + * Copyright (c) 2016-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -71,7 +71,7 @@ void ITensor::copy_from(const ITensor &src) src_it, dst_it); } -#ifdef ARM_COMPUTE_DEBUG_ENABLED +#ifdef ARM_COMPUTE_ASSERTS_ENABLED void ITensor::print(std::ostream &s, IOFormatInfo io_fmt) const { ARM_COMPUTE_ERROR_ON(this->buffer() == nullptr); @@ -152,7 +152,7 @@ void ITensor::print(std::ostream &s, IOFormatInfo io_fmt) const } } } -#endif /* ARM_COMPUTE_DEBUG_ENABLED */ +#endif /* ARM_COMPUTE_ASSERTS_ENABLED */ bool ITensor::is_used() const { diff --git a/src/core/Utils.cpp b/src/core/Utils.cpp index 7223368a7e..2df5f81c61 100644 --- a/src/core/Utils.cpp +++ b/src/core/Utils.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017, 2018 ARM Limited. + * Copyright (c) 2016-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -395,7 +395,7 @@ const std::pair arm_compute::scaled_dimensions(unsig return std::make_pair(w, h); } -#ifdef ARM_COMPUTE_DEBUG_ENABLED +#ifdef ARM_COMPUTE_ASSERTS_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) @@ -456,4 +456,4 @@ int arm_compute::max_consecutive_elements_display_width(std::ostream &s, DataTyp } return 0; } -#endif /* ARM_COMPUTE_DEBUG_ENABLED */ +#endif /* ARM_COMPUTE_ASSERTS_ENABLED */ -- cgit v1.2.1