| 1 |
/* { dg-do run } */ |
| 2 |
/* { dg-options "-fsignaling-nans -mfpmath=sse -O2 -march=x86-64-v3 -mavx10.2" } */ |
| 3 |
/* { dg-require-effective-target avx10_2 } */ |
| 4 |
|
| 5 |
#ifndef AVX10_2 |
| 6 |
#define AVX10_2 |
| 7 |
#define AVX10_512BIT |
| 8 |
#endif |
| 9 |
#include "avx10-helper.h" |
| 10 |
#define SIZE (AVX512F_LEN / 16) |
| 11 |
#include <stdbool.h> |
| 12 |
#include "avx10-minmax-helper.h" |
| 13 |
#include "avx512f-mask-type.h" |
| 14 |
|
| 15 |
void static |
| 16 |
CALC (_Float16 *r, _Float16 *s1, _Float16 *s2, int R) |
| 17 |
{ |
| 18 |
for(int i = 0; i < SIZE; i++) |
| 19 |
r[i] = minmax__Float16(&s1[i], &s2[i], R); |
| 20 |
} |
| 21 |
|
| 22 |
void |
| 23 |
TEST (void) |
| 24 |
{ |
| 25 |
int i, sign; |
| 26 |
UNION_TYPE (AVX512F_LEN, h) res1, res2, res3, src1, src2; |
| 27 |
MASK_TYPE mask = MASK_VALUE; |
| 28 |
_Float16 res_ref[SIZE]; |
| 29 |
|
| 30 |
UNIT_TEST(0, ph, h, _Float16); |
| 31 |
UNIT_TEST(1, ph, h, _Float16); |
| 32 |
UNIT_TEST(4, ph, h, _Float16); |
| 33 |
UNIT_TEST(5, ph, h, _Float16); |
| 34 |
UNIT_TEST(16, ph, h, _Float16); |
| 35 |
UNIT_TEST(17, ph, h, _Float16); |
| 36 |
} |