1 | /******************************************************************************* |
2 | * Copyright 2019-2022 Intel Corporation |
3 | * |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | * you may not use this file except in compliance with the License. |
6 | * You may obtain a copy of the License at |
7 | * |
8 | * http://www.apache.org/licenses/LICENSE-2.0 |
9 | * |
10 | * Unless required by applicable law or agreed to in writing, software |
11 | * distributed under the License is distributed on an "AS IS" BASIS, |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. |
15 | *******************************************************************************/ |
16 | |
17 | #include "dnnl_debug.hpp" |
18 | |
19 | #include "binary/binary.hpp" |
20 | |
21 | namespace binary { |
22 | |
23 | std::ostream &operator<<(std::ostream &s, const prb_t &prb) { |
24 | using ::operator<<; |
25 | |
26 | dump_global_params(s); |
27 | settings_t def; |
28 | |
29 | if (canonical || prb.sdt != def.sdt[0]) s << "--sdt=" << prb.sdt << " " ; |
30 | if (canonical || prb.ddt != def.ddt[0]) s << "--ddt=" << prb.ddt << " " ; |
31 | if (canonical || prb.stag != def.stag[0]) s << "--stag=" << prb.stag << " " ; |
32 | if (canonical || prb.dtag != def.dtag[0]) s << "--dtag=" << prb.dtag << " " ; |
33 | if (canonical || prb.alg != def.alg[0]) s << "--alg=" << prb.alg << " " ; |
34 | if (canonical || prb.inplace != def.inplace[0]) |
35 | s << "--inplace=" << bool2str(prb.inplace) << " " ; |
36 | |
37 | s << prb.attr; |
38 | if (canonical || prb.ctx_init != def.ctx_init[0]) |
39 | s << "--ctx-init=" << prb.ctx_init << " " ; |
40 | if (canonical || prb.ctx_exe != def.ctx_exe[0]) |
41 | s << "--ctx-exe=" << prb.ctx_exe << " " ; |
42 | |
43 | s << static_cast<prb_vdims_t>(prb); |
44 | |
45 | return s; |
46 | } |
47 | |
48 | } // namespace binary |
49 | |