diff options
Diffstat (limited to 'runtime/onert/backend/cpu/ops/MatrixBandPartLayer.cc')
-rw-r--r-- | runtime/onert/backend/cpu/ops/MatrixBandPartLayer.cc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/runtime/onert/backend/cpu/ops/MatrixBandPartLayer.cc b/runtime/onert/backend/cpu/ops/MatrixBandPartLayer.cc index b770cce5d..7220a2bab 100644 --- a/runtime/onert/backend/cpu/ops/MatrixBandPartLayer.cc +++ b/runtime/onert/backend/cpu/ops/MatrixBandPartLayer.cc @@ -30,7 +30,7 @@ namespace ops { MatrixBandPartLayer::MatrixBandPartLayer() - : _input(nullptr), _num_lower_diag(nullptr), _num_upper_diag(nullptr), _output(nullptr) + : _input(nullptr), _num_lower_diag(nullptr), _num_upper_diag(nullptr), _output(nullptr) { // DO NOTHING } @@ -40,18 +40,14 @@ void MatrixBandPartLayer::matrixBandPartFloat32() if (_num_lower_diag->data_type() == OperandType::INT64) { nnfw::cker::MatrixBandPart<int64_t>( - *reinterpret_cast<const int64_t *>(_num_lower_diag->buffer()), - *reinterpret_cast<const int64_t *>(_num_upper_diag->buffer()), getTensorShape(_input), - reinterpret_cast<const float *>(_input->buffer()), getTensorShape(_output), - reinterpret_cast<float *>(_output->buffer())); + *getBuffer<int64_t>(_num_lower_diag), *getBuffer<int64_t>(_num_upper_diag), getShape(_input), + getBuffer<float>(_input), getShape(_output), getBuffer<float>(_output)); } else { nnfw::cker::MatrixBandPart<int32_t>( - *reinterpret_cast<const int32_t *>(_num_lower_diag->buffer()), - *reinterpret_cast<const int32_t *>(_num_upper_diag->buffer()), getTensorShape(_input), - reinterpret_cast<const float *>(_input->buffer()), getTensorShape(_output), - reinterpret_cast<float *>(_output->buffer())); + *getBuffer<int32_t>(_num_lower_diag), *getBuffer<int32_t>(_num_upper_diag), getShape(_input), + getBuffer<float>(_input), getShape(_output), getBuffer<float>(_output)); } } |