Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit 5f811ef

Browse files
nicolasvasilacheftynse
authored andcommitted
Fix CPU mapping options printing
operator<< was missing for CpuMappingOptions, add it
1 parent 6d2f56b commit 5f811ef

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

tc/core/cpu/cpu_mapping_options.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,12 @@ CpuMappingOptions CpuMappingOptions::makeNaiveMappingOptions() {
7878
return makeUnmappedMappingOptions().tile(32, 32, 32).unroll(1);
7979
}
8080

81+
std::ostream& operator<<(
82+
std::ostream& os,
83+
const CpuMappingOptions& cpuOptions) {
84+
OstreamBoolalphaScope scope(os);
85+
tc::CpuMappingOptionsAsCpp cpp(cpuOptions);
86+
os << cpp;
87+
return os;
88+
}
8189
} // namespace tc

tc/core/cpu/cpu_mapping_options.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,7 @@ class CpuMappingOptions {
7979
public:
8080
MappingOptionsView generic;
8181
};
82+
83+
std::ostream& operator<<(std::ostream& os, const CpuMappingOptions& view);
84+
8285
} // namespace tc

0 commit comments

Comments
 (0)