aboutsummaryrefslogtreecommitdiff
path: root/src/core/ITensor.cpp
diff options
context:
space:
mode:
authorIoan-Cristian Szabo <ioan-cristian.szabo@arm.com>2017-12-12 09:56:21 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:42:33 +0000
commit571209172d392dcf0ffe45955a74dd3bff41c425 (patch)
tree42316db9a68e7bca6b24c3d2d789f3d094de894b /src/core/ITensor.cpp
parentb5311a63d9bc1d8c9265aba5a9e031726cc512b3 (diff)
downloadComputeLibrary-571209172d392dcf0ffe45955a74dd3bff41c425.tar.gz
Add support to print tensor with multiple channels.
Change-Id: I413ff8c55bcc254ff1bd5cbef84a93e639cbe288 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/112843 Reviewed-by: Anthony Barbier <anthony.barbier@arm.com> Tested-by: BSG Visual Compute Jenkins server to access repositories on http://mpd-gerrit.cambridge.arm.com <bsgcomp@arm.com>
Diffstat (limited to 'src/core/ITensor.cpp')
-rw-r--r--src/core/ITensor.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/ITensor.cpp b/src/core/ITensor.cpp
index 4a54675561..b65c4f4c97 100644
--- a/src/core/ITensor.cpp
+++ b/src/core/ITensor.cpp
@@ -75,10 +75,11 @@ void ITensor::print(std::ostream &s, IOFormatInfo io_fmt) const
{
ARM_COMPUTE_ERROR_ON(this->buffer() == nullptr);
- const DataType dt = this->info()->data_type();
- const size_t slices2D = this->info()->tensor_shape().total_size_upper(2);
- const Strides strides = this->info()->strides_in_bytes();
- const PaddingSize padding = this->info()->padding();
+ const DataType dt = this->info()->data_type();
+ const size_t slices2D = this->info()->tensor_shape().total_size_upper(2);
+ const Strides strides = this->info()->strides_in_bytes();
+ const PaddingSize padding = this->info()->padding();
+ const size_t num_channels = this->info()->num_channels();
// Set precision
if(is_data_type_float(dt) && (io_fmt.precision_type != IOFormatInfo::PrecisionType::Default))
@@ -117,6 +118,8 @@ void ITensor::print(std::ostream &s, IOFormatInfo io_fmt) const
break;
}
+ print_width = print_width * num_channels;
+
// Set pointer to start
const uint8_t *ptr = this->buffer() + start_offset;