| 1021 | (operator.eq, "cmpeq") |
| 1022 | ]) |
| 1023 | def test_operators_comparison(self, func, intrin): |
| 1024 | if self._is_fp(): |
| 1025 | data_a = self._data() |
| 1026 | else: |
| 1027 | data_a = self._data(self._int_max() - self.nlanes) |
| 1028 | data_b = self._data(self._int_min(), reverse=True) |
| 1029 | vdata_a, vdata_b = self.load(data_a), self.load(data_b) |
| 1030 | intrin = getattr(self, intrin) |
| 1031 | |
| 1032 | mask_true = self._true_mask() |
| 1033 | def to_bool(vector): |
| 1034 | return [lane == mask_true for lane in vector] |
| 1035 | |
| 1036 | data_cmp = [func(a, b) for a, b in zip(data_a, data_b)] |
| 1037 | cmp = to_bool(intrin(vdata_a, vdata_b)) |
| 1038 | assert cmp == data_cmp |
| 1039 | |
| 1040 | def test_operators_logical(self): |
| 1041 | if self._is_fp(): |