#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#include "example_utils.hpp"
IC = 3,
IH = 27,
IW = 27,
KH = 11,
KW = 11,
PH_L = 0,
PH_R = 0,
PW_L = 0,
PW_R = 0,
SH = 4,
SW = 4,
DH = 1,
DW = 1;
const memory::dim OH = (IH - ((KH - 1) * DH + KH) + PH_L + PH_R) / SH + 1;
const memory::dim OW = (IW - ((KW - 1) * DW + KW) + PW_L + PW_R) / SW + 1;
std::vector<float> src_data(product(src_dims));
std::vector<float> dst_data(product(dst_dims));
std::generate(src_data.begin(), src_data.end(), []() {
static int i = 0;
return std::cos(i++ / 10.f);
});
write_to_dnnl_memory(src_data.data(), src_mem);
dilation, padding_dims_l, padding_dims_r);
auto workspace_mem =
memory(pooling_pd.workspace_desc(),
engine);
std::unordered_map<int, memory> pooling_args;
pooling_prim.execute(engine_stream, pooling_args);
engine_stream.wait();
read_from_dnnl_memory(dst_data.data(), dst_mem);
}
int main(int argc, char **argv) {
return handle_example_errors(
pooling_example, parse_engine_kind(argc, argv));
}