#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#include "example_utils.hpp"
IC = 3,
IH = 150,
IW = 150;
std::vector<float> src_0_data(product(src_0_dims));
std::vector<float> src_1_data(product(src_1_dims));
std::generate(src_0_data.begin(), src_0_data.end(), []() {
static int i = 0;
return std::cos(i++ / 10.f);
});
std::generate(src_1_data.begin(), src_1_data.end(), []() {
static int i = 0;
return std::sin(i++ * 2.f);
});
auto src_0_md =
memory::desc(src_0_dims, dt::f32, tag::nchw);
auto src_1_md =
memory::desc(src_1_dims, dt::f32, tag::nchw);
write_to_dnnl_memory(src_0_data.data(), src_0_mem);
write_to_dnnl_memory(src_1_data.data(), src_1_mem);
const float scale = 1.0f;
const float alpha = 0.f;
const float beta = 0.f;
auto binary_prim =
binary(binary_pd);
std::unordered_map<int, memory> binary_args;
binary_prim.execute(engine_stream, binary_args);
engine_stream.wait();
read_from_dnnl_memory(src_0_data.data(), src_0_mem);
}
int main(int argc, char **argv) {
return handle_example_errors(binary_example, parse_engine_kind(argc, argv));
}