operands.at(index).type(type);
}
-ExplicitPadding setExplicitPaddingParam(Operands &operands, const OperandIndex &left_index,
- const OperandIndex &right_index,
- const OperandIndex &top_index,
- const OperandIndex &bottom_index)
+ExplicitPadding makeExplicitPadding(Operands &operands, const OperandIndex &left_index,
+ const OperandIndex &right_index, const OperandIndex &top_index,
+ const OperandIndex &bottom_index)
{
auto left = operands.at(left_index).asScalar<int32_t>();
auto right = operands.at(right_index).asScalar<int32_t>();
return param;
}
-Stride setStride(Operands &operands, const OperandIndex &horizontal_index,
- const OperandIndex &vertical_index)
+Stride makeStride(Operands &operands, const OperandIndex &horizontal_index,
+ const OperandIndex &vertical_index)
{
auto horizontal = operands.at(horizontal_index).asScalar<int32_t>();
auto vertical = operands.at(vertical_index).asScalar<int32_t>();
}
Stride stride;
- stride.horizontal = horizontal;
- stride.vertical = vertical;
+ stride.horizontal = static_cast<uint32_t>(horizontal);
+ stride.vertical = static_cast<uint32_t>(vertical);
return stride;
}
const auto activation_index = OperandIndex{init_param.inputs[10]};
param.padding.type = PaddingType::EXPLICIT;
- param.padding.param =
- setExplicitPaddingParam(operands, padding_left_index, padding_right_index,
- padding_top_index, padding_bottom_index);
+ param.padding.param = makeExplicitPadding(operands, padding_left_index, padding_right_index,
+ padding_top_index, padding_bottom_index);
param.hstride_index = OperandIndex{init_param.inputs[7]};
param.vstride_index = OperandIndex{init_param.inputs[8]};
param.multiplier_index = OperandIndex{init_param.inputs[9]};
const auto activation_index = OperandIndex{init_param.inputs[9]};
param.padding.type = PaddingType::EXPLICIT;
- param.padding.param =
- setExplicitPaddingParam(operands, padding_left_index, padding_right_index,
- padding_top_index, padding_bottom_index);
+ param.padding.param = makeExplicitPadding(operands, padding_left_index, padding_right_index,
+ padding_top_index, padding_bottom_index);
param.hstride_index = OperandIndex{init_param.inputs[5]};
param.vstride_index = OperandIndex{init_param.inputs[6]};
const auto activation_index = OperandIndex{init_param.inputs[9]};
param.padding.type = PaddingType::EXPLICIT;
- param.padding.param =
- setExplicitPaddingParam(operands, padding_left_index, padding_right_index,
- padding_top_index, padding_bottom_index);
+ param.padding.param = makeExplicitPadding(operands, padding_left_index, padding_right_index,
+ padding_top_index, padding_bottom_index);
param.hstride_index = OperandIndex{init_param.inputs[5]};
param.vstride_index = OperandIndex{init_param.inputs[6]};
param.padding.type =
NNAPIConvert::getPaddingType(operands.at(padding_index).asScalar<PaddingCode>());
- param.stride = setStride(operands, hstride_index, vstride_index);
+ param.stride = makeStride(operands, hstride_index, vstride_index);
param.activation =
NNAPIConvert::getFusedActivation(operands.at(activation_index).asScalar<FuseCode>());
}
const auto activation_index = OperandIndex{init_param.inputs[9]};
param.padding.type = PaddingType::EXPLICIT;
- param.padding.param =
- setExplicitPaddingParam(operands, padding_left_index, padding_right_index,
- padding_top_index, padding_bottom_index);
- param.stride = setStride(operands, hstride_index, vstride_index);
+ param.padding.param = makeExplicitPadding(operands, padding_left_index, padding_right_index,
+ padding_top_index, padding_bottom_index);
+ param.stride = makeStride(operands, hstride_index, vstride_index);
param.activation =
NNAPIConvert::getFusedActivation(operands.at(activation_index).asScalar<FuseCode>());
}
const auto activation_index = OperandIndex{init_param.inputs[9]};
param.padding.type = PaddingType::EXPLICIT;
- param.padding.param =
- setExplicitPaddingParam(operands, padding_left_index, padding_right_index,
- padding_top_index, padding_bottom_index);
+ param.padding.param = makeExplicitPadding(operands, padding_left_index, padding_right_index,
+ padding_top_index, padding_bottom_index);
param.hstride_index = OperandIndex{init_param.inputs[5]};
param.vstride_index = OperandIndex{init_param.inputs[6]};
param.kw_index = OperandIndex{init_param.inputs[7]};