namespace adaptive_pool {
// global functions
size_t window_start(size_t idx, size_t arg_shape, size_t out_shape);
size_t window_end(size_t idx, size_t arg_shape, size_t out_shape);
template <typename T>
T avg_div(const T sum, size_t n);
template <typename T>
void adaptive_avg_pool_1d(
const T \* arg,
T \* out,
size_t h_in,
size_t h_out
);
template <typename T>
void adaptive_avg_pool_2d(
const T \* arg,
T \* out,
size_t h_in,
size_t h_out,
size_t w_in,
size_t w_out
);
template <typename T>
void adaptive_avg_pool_3d(
const T \* arg,
T \* out,
size_t d_in,
size_t d_out,
size_t h_in,
size_t h_out,
size_t w_in,
size_t w_out
);
} // namespace adaptive_pool