// File: conv2d_depthwise.cpp
// Binding harness: computes H_out/W_out from constexpr params, calls inner_conv2d_depthwise.
// ABI: armbench_entry_conv2d_depthwise(input*, output*, weight*, bias*, input_scales*, weight_scales*, N, C, H, W)
#include "conv2d_depthwise.h"
using namespace conv2d_depthwise_def;

extern "C" int armbench_entry_conv2d_depthwise(
    const int8_t* input, float* output,
    const int8_t* weight, const float* bias,
    const float* input_scales, const float* weight_scales,
    int N, int C, int H, int W)
{
    constexpr int ext_kh = Dh * (Kh - 1) + 1;
    constexpr int ext_kw = Dw * (Kw - 1) + 1;
    const int H_out = (H + 2 * pad - ext_kh) / Sh + 1;
    const int W_out = (W + 2 * pad - ext_kw) / Sw + 1;
    inner_conv2d_depthwise(input, output, weight, bias, input_scales, weight_scales,
                           N, C, H, W, H_out, W_out);
    return 0;
}