(self)
| 539 | ) |
| 540 | |
| 541 | def test_targets(self): |
| 542 | # test skipping baseline features |
| 543 | self.expect_targets( |
| 544 | """ |
| 545 | /*@targets |
| 546 | sse sse2 sse41 avx avx2 avx512f |
| 547 | vsx vsx2 vsx3 vsx4 |
| 548 | neon neon_fp16 asimdhp asimddp |
| 549 | vx vxe vxe2 |
| 550 | */ |
| 551 | """, |
| 552 | baseline="avx vsx2 asimd vx vxe", |
| 553 | x86="avx512f avx2", armhf="asimddp asimdhp", ppc64="vsx4 vsx3", |
| 554 | s390x="vxe2" |
| 555 | ) |
| 556 | # test skipping non-dispatch features |
| 557 | self.expect_targets( |
| 558 | """ |
| 559 | /*@targets |
| 560 | sse41 avx avx2 avx512f |
| 561 | vsx2 vsx3 vsx4 |
| 562 | asimd asimdhp asimddp |
| 563 | vx vxe vxe2 |
| 564 | */ |
| 565 | """, |
| 566 | baseline="", dispatch="sse41 avx2 vsx2 asimd asimddp vxe2", |
| 567 | x86="avx2 sse41", armhf="asimddp asimd", ppc64="vsx2", s390x="vxe2" |
| 568 | ) |
| 569 | # test skipping features that not supported |
| 570 | self.expect_targets( |
| 571 | """ |
| 572 | /*@targets |
| 573 | sse2 sse41 avx2 avx512f |
| 574 | vsx2 vsx3 vsx4 |
| 575 | neon asimdhp asimddp |
| 576 | vx vxe vxe2 |
| 577 | */ |
| 578 | """, |
| 579 | baseline="", |
| 580 | trap_files=".*(avx2|avx512f|vsx3|vsx4|asimddp|vxe2).c", |
| 581 | x86="sse41 sse2", ppc64="vsx2", armhf="asimdhp neon", |
| 582 | s390x="vxe vx" |
| 583 | ) |
| 584 | # test skipping features that implies each other |
| 585 | self.expect_targets( |
| 586 | """ |
| 587 | /*@targets |
| 588 | sse sse2 avx fma3 avx2 avx512f avx512cd |
| 589 | vsx vsx2 vsx3 |
| 590 | neon neon_vfpv4 neon_fp16 neon_fp16 asimd asimdhp |
| 591 | asimddp asimdfhm |
| 592 | */ |
| 593 | """, |
| 594 | baseline="", |
| 595 | x86_gcc="avx512cd avx512f avx2 fma3 avx sse2", |
| 596 | x86_msvc="avx512cd avx2 avx sse2", |
| 597 | x86_icc="avx512cd avx2 avx sse2", |
| 598 | x86_iccw="avx512cd avx2 avx sse2", |
nothing calls this directly
no test coverage detected