#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#include "example_utils.hpp"
IC = 3,
IH = 120,
IW = 120;
const int num_src = 10;
const int axis = 1;
std::vector<float> src_data(product(src_dims));
std::generate(src_data.begin(), src_data.end(), []() {
static int i = 0;
return std::cos(i++ / 10.f);
});
std::vector<memory::desc> src_mds;
std::vector<memory> src_mems;
for (int n = 0; n < num_src; ++n) {
write_to_dnnl_memory(src_data.data(), mem);
src_mds.push_back(md);
src_mems.push_back(mem);
}
auto concat_prim =
concat(concat_pd);
std::unordered_map<int, memory> concat_args;
for (int n = 0; n < num_src; ++n)
concat_args.insert({DNNL_ARG_MULTIPLE_SRC + n, src_mems[n]});
concat_prim.execute(engine_stream, concat_args);
}
int main(int argc, char **argv) {
return handle_example_errors(concat_example, parse_engine_kind(argc, argv));
}