#include "Tensor.h"
-#define NO_USE(a) (void)(a)
-
namespace neurun
{
namespace backend
namespace operand
{
-size_t Tensor::calcOffset(const neurun::util::feature::Coordinate4D &coords)
+size_t Tensor::calcOffset(const neurun::util::feature::Coordinate4D &)
{
- NO_USE(coords);
throw std::runtime_error("offset_element_in_bytes is not supported for cpu::Tensor now.");
}
#include "graph/operation/LowerInfo.h"
#include "util/logging.h"
+#include "util/Utils.h"
namespace neurun
{
void OperationValidator::visit(const model::operation::SoftmaxNode &node)
{
- (void)node; // NOTE To prevent from unused variable warning
-
VERBOSE(Softmax) << "Configure SOFTMAX operation" << std::endl;
const auto output_index{node.getOutputs().at(0)};
const auto input_index{node.getInputs().at(0)};
const auto scale_index{node.param().scale_index};
+ UNUSED_RELEASE(output_index);
+ UNUSED_RELEASE(input_index);
+
assert(_ctx.at(output_index).shape().rank() == _ctx.at(input_index).shape().rank());
assert(_ctx.at(scale_index).shape().rank() == 0);
}
void OperationValidator::visit(const model::operation::PermuteNode &node)
{
- (void)node; // NOTE To prevent from unused variable warning
-
VERBOSE(Permute) << "Configure Permute operation" << std::endl;
const auto output_index{node.getOutputs().at(0)};
const auto input_index{node.getInputs().at(0)};
+ UNUSED_RELEASE(output_index);
+ UNUSED_RELEASE(input_index);
+
assert(_ctx.at(output_index).shape().rank() == _ctx.at(input_index).shape().rank());
}
#ifndef __NEURUN_UTIL_FEATURE_NHWC_READER_H__
#define __NEURUN_UTIL_FEATURE_NHWC_READER_H__
+#include "util/Utils.h"
#include "Utils.h"
#include "misc/feature/Reader.h"
Reader(const ::nnfw::misc::feature::Shape &shape, const T *ptr, size_t len)
: _shape{shape}, _ptr{ptr}
{
- (void)len; // Workaround for unused variable in release mode
+ UNUSED_RELEASE(len); // Workaround for unused variable in release mode
assert(shape.N * shape.C * shape.H * shape.W * sizeof(T) == len);
}
#include <cassert>
#include "Utils.h"
+#include "util/Utils.h"
#include "misc/feature/Reader.h"
public:
View(const ::nnfw::misc::feature::Shape &shape, T *ptr, size_t len) : _shape{shape}, _ptr{ptr}
{
- (void)len; // Workaround for unused variable in release mode
+ UNUSED_RELEASE(len); // Workaround for unused variable in release mode
assert(shape.N * shape.C * shape.H * shape.W * sizeof(T) == len);
}