// 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*, N, C, H, W)
// Input layout: (N, C, H, W); output layout: (N, C, H_out, W_out).
#include "conv2d_depthwise.h"
using namespace conv2d_depthwise_def;

extern "C" int armbench_entry_conv2d_depthwise(
    const float* input, float* output,
    const float* weight, const float* bias,
    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, N, C, H, W, H_out, W_out);
    return 0;
}