Skip to content

Commit

Permalink
fixup: cpu: x64: brgemm: fix hidden operator==
Browse files Browse the repository at this point in the history
c++20 introduced new mechanics of comparison operators and now certain
scenarios require both operator== and operator!= to be defined so that
the operation would be equivalent for a X b and b X a.
  • Loading branch information
dzarukin authored and mgouicem committed Nov 29, 2024
1 parent 4e5f054 commit 891c69a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/cpu/x64/brgemm/jit_brgemm_amx_uker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@ struct jit_brgemm_amx_uker_base_t : public jit_generator {
virtual bool operator==(const dim_iteration_t &rhs) const {
return blocks == rhs.blocks;
}
virtual bool operator!=(const dim_iteration_t &rhs) const {
return !operator==(rhs);
}

size_t pos(size_t b) const {
assert(b < blocks.size());
Expand Down Expand Up @@ -318,6 +321,9 @@ struct jit_brgemm_amx_uker_base_t : public jit_generator {
&& zp_comp_pad_a_shift == rhs.zp_comp_pad_a_shift;
return res;
}
bool operator!=(const dim_iteration_t &_rhs) const override {
return !operator==(_rhs);
}
};

struct bs_iteration_t {
Expand Down

0 comments on commit 891c69a

Please sign in to comment.