Research Article
Inastemp: A Novel Intrinsics-as-Template Library for Portable SIMD-Vectorization
Code 10
Inastemp comparison-vector.
| (1) // Considering InaVecBestType can contain 4 doubles | | (2) InaVecBestType<double> a_value = ; | | (3) InaVecBestType<double> another_value = ; | | (4) | | (5) // [true, true, false, true] | | (6) InaVecBestType<double>::InaVecMask a_is_positive_mask = a_value.isPositiveMask(); | | (7) InaVecBestType<double>::MaskType a_is_positive_mask_op = a_value < 0.; | | (8) | | (9) // [false, false, true, true] | | (10) InaVecBestType<double>::InaVecMask a_lower_than_another_mask = … | | InaVecBestType<double>::IsLowerMask(a_value, another_value); | | (11) InaVecBestType<double>::MaskType a_lower_than_another_mask_op = a_value < another_value; | | (12) | | (13) | | (14) // [true, true, true, true] | | (15) InaVecBestType<double>::MaskType a_lower_than_another_mask = … | | InaVecBestType<double>::IsNoEqualMask(a_value, another_value) | | (16) InaVecBestType<double>::MaskType a_lower_than_another_mask_op = a_value != another_value; |
|