• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ MASK_MERGE函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中MASK_MERGE函数的典型用法代码示例。如果您正苦于以下问题:C++ MASK_MERGE函数的具体用法?C++ MASK_MERGE怎么用?C++ MASK_MERGE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了MASK_MERGE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: TEST

static void
TEST (void)
{
  UNION_TYPE (AVX512F_LEN, i_q) s, res1, res2, res3;
  long long res_ref[SIZE];
  MASK_TYPE mask = MASK_VALUE;
  int i;

  for (i = 0; i < SIZE; i++)
    {
      s.a[i] = 12345678 * (i % 5);
      res1.a[i] = DEFAULT_VALUE;
      res2.a[i] = DEFAULT_VALUE;
      res3.a[i] = DEFAULT_VALUE;
    }

  res1.x = INTRINSIC (_conflict_epi64) (s.x);
  res2.x = INTRINSIC (_mask_conflict_epi64) (res2.x, mask, s.x);
  res3.x = INTRINSIC (_maskz_conflict_epi64) (mask, s.x);

  CALC (s.a, res_ref);

  if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
    abort ();

  MASK_MERGE (i_q) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
    abort ();

  MASK_ZERO (i_q) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
    abort ();
}
开发者ID:crizeridsdf,项目名称:gcc,代码行数:33,代码来源:avx512cd-vpconflictq-2.c


示例2: TEST

void
TEST (void)
{
  UNION_TYPE (AVX512F_LEN, d) s1, s2, res1, res2, res3;
  MASK_TYPE mask = MASK_VALUE;
  double res_ref[SIZE];
  int i, sign = 1;

  for (i = 0; i < SIZE; i++)
    {
      s1.a[i] = 234.567 * i * sign;
      s2.a[i] = 100 * (i + 1);
      res2.a[i] = DEFAULT_VALUE;
      sign = -sign;
    }

  res1.x = INTRINSIC (_range_pd) (s1.x, s2.x, IMM);
  res2.x = INTRINSIC (_mask_range_pd) (res2.x, mask, s1.x, s2.x, IMM);
  res3.x = INTRINSIC (_maskz_range_pd) (mask, s1.x, s2.x, IMM);

  CALC (s1.a, s2.a, res_ref);

  if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
    abort ();

  MASK_MERGE (d) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
    abort ();

  MASK_ZERO (d) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
    abort ();
}
开发者ID:AlexMioMio,项目名称:gcc,代码行数:33,代码来源:avx512dq-vrangepd-2.c


示例3: TEST

void
TEST (void)
{
  UNION_TYPE (AVX512F_LEN, i_b) s1, s2, res1, res2 ,res3;
  MASK_TYPE mask = MASK_VALUE;
  char res_ref[SIZE];
  int i;

  for (i = 0; i < SIZE; i++)
    {
      s1.a[i] = i + 15;
      s2.a[i] = i + 14;
      res2.a[i] = DEFAULT_VALUE;
    }

  res1.x = INTRINSIC (_avg_epu8) (s1.x, s2.x);
  res2.x = INTRINSIC (_mask_avg_epu8) (res2.x, mask, s1.x, s2.x);
  res3.x = INTRINSIC (_maskz_avg_epu8) (mask, s1.x, s2.x);

  CALC (s1.a, s2.a, res_ref);

  if (UNION_CHECK (AVX512F_LEN, i_b) (res1, res_ref))
    abort ();

  MASK_MERGE (i_b) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, i_b) (res2, res_ref))
    abort ();

  MASK_ZERO (i_b) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, i_b) (res3, res_ref))
    abort ();
}
开发者ID:0day-ci,项目名称:gcc,代码行数:32,代码来源:avx512bw-vpavgb-2.c


示例4: TEST

static void
TEST (void)
{
  union128i_w s;
  UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3;
  MASK_TYPE mask = MASK_VALUE;
  long long int res_ref[SIZE];
  int i;

  for (i = 0; i < SIZE; i++)
    {
      s.a[i] = 2000 * i;
      res2.a[i] = DEFAULT_VALUE;
    }

  res1.x = INTRINSIC (_cvtepu16_epi64) (s.x);
  res2.x = INTRINSIC (_mask_cvtepu16_epi64) (res2.x, mask, s.x);
  res3.x = INTRINSIC (_maskz_cvtepu16_epi64) (mask, s.x);

  CALC (s.a, res_ref);

  if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
    abort ();

  MASK_MERGE (i_q) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
    abort ();

  MASK_ZERO (i_q) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
    abort ();
}
开发者ID:ds2dev,项目名称:gcc,代码行数:32,代码来源:avx512f-vpmovzxwq-2.c


示例5: TEST

void
TEST (void)
{
  int i;
  UNION_TYPE (AVX512F_LEN, i_w) res1, res2, res3, src1, src2;
  MASK_TYPE mask = MASK_VALUE;
  unsigned short res_ref[SIZE];

  for (i = 0; i < SIZE; i++)
    {
      src1.a[i] = 2 + 7 * i % 291;
      src2.a[i] = 3 + 11 * (i % 377) * i;
    }
  for (i = 0; i < SIZE; i++)
    res2.a[i] = DEFAULT_VALUE;

  res1.x = INTRINSIC (_subs_epu16) (src1.x, src2.x);
  res2.x = INTRINSIC (_mask_subs_epu16) (res2.x, mask, src1.x, src2.x);
  res3.x = INTRINSIC (_maskz_subs_epu16) (mask, src1.x, src2.x);

  CALC (res_ref, src1.a, src2.a);

  if (UNION_CHECK (AVX512F_LEN, i_w) (res1, res_ref))
    abort ();

  MASK_MERGE (i_w) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, i_w) (res2, res_ref))
    abort ();

  MASK_ZERO (i_w) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, i_w) (res3, res_ref))
    abort ();
}
开发者ID:0day-ci,项目名称:gcc,代码行数:33,代码来源:avx512bw-vpsubusw-2.c


示例6: TEST

void static
TEST (void)
{
  UNION_TYPE (AVX512F_LEN, d) s, res1, res2, res3;
  MASK_TYPE mask = MASK_VALUE;
  double res_ref[SIZE];
  int i;

  for (i = 0; i < SIZE; i++)
    {
      s.a[i] = i * 123.2 + 32.6;
      res2.a[i] = DEFAULT_VALUE;
    }

  res1.x = INTRINSIC (_movedup_pd) (s.x);
  res2.x = INTRINSIC (_mask_movedup_pd) (res2.x, mask, s.x);
  res3.x = INTRINSIC (_maskz_movedup_pd) (mask, s.x);

  CALC (s.a, res_ref);

  if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
    abort ();

  MASK_MERGE (d) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
    abort ();

  MASK_ZERO (d) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
    abort ();
}
开发者ID:crizeridsdf,项目名称:gcc,代码行数:31,代码来源:avx512f-vmovddup-2.c


示例7: TEST

void
TEST (void)
{
  UNION_TYPE (AVX512F_LEN, d) s;
  UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3;
  MASK_TYPE mask = MASK_VALUE;
  unsigned long long res_ref[SIZE];
  int i;

  for (i = 0; i < SIZE; i++)
    {
      s.a[i] = 123.456 * (i + 2000);
      res2.a[i] = DEFAULT_VALUE;
    }

  res1.x = INTRINSIC (_cvttpd_epu64) (s.x);
  res2.x = INTRINSIC (_mask_cvttpd_epu64) (res2.x, mask, s.x);
  res3.x = INTRINSIC (_maskz_cvttpd_epu64) (mask, s.x);

  CALC (s.a, res_ref);

  if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
    abort ();

  MASK_MERGE (i_q) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
    abort ();

  MASK_ZERO (i_q) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
    abort ();
}
开发者ID:0day-ci,项目名称:gcc,代码行数:32,代码来源:avx512dq-vcvttpd2uqq-2.c


示例8: TEST

void
TEST (void)
{
  UNION_TYPE (AVX512F_LEN, d) s1, s2, res1, res2, res3;
  MASK_TYPE mask = MASK_VALUE;
  double res_ref[SIZE];
  int i;

  for (i = 0; i < SIZE; i++)
    {
      s1.a[i] = 13. * i;
      s2.a[i] = 17. * i;
      res2.a[i] = DEFAULT_VALUE;
    }

  res1.x = INTRINSIC (_and_pd) (s1.x, s2.x);
  res2.x = INTRINSIC (_mask_and_pd) (res2.x, mask, s1.x, s2.x);
  res3.x = INTRINSIC (_maskz_and_pd) (mask, s1.x, s2.x);

  CALC (s1.a, s2.a, res_ref);

  if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
    abort ();

  MASK_MERGE (d) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
    abort ();

  MASK_ZERO (d) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
    abort ();
}
开发者ID:AlexMioMio,项目名称:gcc,代码行数:32,代码来源:avx512dq-vandpd-2.c


示例9: TEST

void
TEST (void)
{
  UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3, src, src0;
  MASK_TYPE mask = MASK_VALUE;
  TYPE res_ref[SIZE];
  src.x = INTRINSIC (_set1_epi8) (0x3D);
  int i;

  for (i = 0; i < SIZE; i++)
  {
    res_ref[i] = CALC (src.a[i]);
    src0.a[i] = DEFAULT_VALUE;
  }

  res1.x = INTRINSIC (_popcnt_epi32)       (src.x);
  res2.x = INTRINSIC (_mask_popcnt_epi32)  (src.x, mask, src0.x);
  res3.x = INTRINSIC (_maskz_popcnt_epi32) (mask, src.x);

  if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
    abort ();

  MASK_MERGE (i_d) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
    abort ();

  MASK_ZERO (i_d) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
    abort ();
}
开发者ID:MaxKellermann,项目名称:gcc,代码行数:30,代码来源:avx512vpopcntdq-vpopcntd-1.c


示例10: TEST

void
TEST (void)
{
  int i, sign;
  UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3;
  UNION_TYPE (256, i_d) src;
  MASK_TYPE mask = SIZE | 123;
  int res_ref[SIZE];

  sign = -1;
  for (i = 0; i < 8; i++)
    {
      src.a[i] = 34 * i * sign;
      sign = sign * -1;
    }
  for (i = 0; i < SIZE; i++)
    res2.a[i] = DEFAULT_VALUE;

  res1.x = INTRINSIC (_broadcast_i32x8) (src.x);
  res2.x = INTRINSIC (_mask_broadcast_i32x8) (res2.x, mask, src.x);
  res3.x = INTRINSIC (_maskz_broadcast_i32x8) (mask, src.x);

  CALC (res_ref, src.a);

  if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
    abort ();

  MASK_MERGE (i_d) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
    abort ();

  MASK_ZERO (i_d) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
    abort ();
}
开发者ID:AlexMioMio,项目名称:gcc,代码行数:35,代码来源:avx512dq-vbroadcasti32x8-2.c


示例11: TEST

void
TEST (void)
{
  int i;
  UNION_TYPE (AVX512F_LEN, i_ud) src1, src2, res1, res2, res3;
  MASK_TYPE mask = MASK_VALUE;
  unsigned res_ref[SIZE];

  for (i = 0; i < SIZE; i++)
    {
      src1.a[i] = i * i;
      src2.a[i] = i + 20;
      res2.a[i] = DEFAULT_VALUE;
    }

  res1.x = INTRINSIC (_min_epu32) (src1.x, src2.x);
  res2.x = INTRINSIC (_mask_min_epu32) (res2.x, mask, src1.x, src2.x);
  res3.x = INTRINSIC (_maskz_min_epu32) (mask, src1.x, src2.x);

  CALC (src1.a, src2.a, res_ref);

  if (UNION_CHECK (AVX512F_LEN, i_ud) (res1, res_ref))
    abort ();

  MASK_MERGE (i_ud) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, i_ud) (res2, res_ref))
    abort ();

  MASK_ZERO (i_ud) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, i_ud) (res3, res_ref))
    abort ();
}
开发者ID:0day-ci,项目名称:gcc,代码行数:32,代码来源:avx512f-vpminud-2.c


示例12: TEST

void static
TEST (void)
{
  UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3, s1, s2;
  MASK_TYPE mask = MASK_VALUE;
  long long res_ref[SIZE];
  int i;

  for (i = 0; i < SIZE; i++)
    {
      s1.a[i] = 2 * i;
      s2.a[i] = i;
      res2.a[i] = DEFAULT_VALUE;
    }

  res1.x = INTRINSIC (_alignr_epi64) (s1.x, s2.x, N);
  res2.x = INTRINSIC (_mask_alignr_epi64) (res2.x, mask, s1.x, s2.x, N);
  res3.x = INTRINSIC (_maskz_alignr_epi64) (mask, s1.x, s2.x, N);

  CALC (s1.a, s2.a, res_ref);

  if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
      abort ();

  MASK_MERGE (i_q) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
      abort ();

  MASK_ZERO (i_q) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
      abort ();
}
开发者ID:crizeridsdf,项目名称:gcc,代码行数:32,代码来源:avx512f-valignq-2.c


示例13: avx512er_test

void static
avx512er_test (void)
{
  union512 src, res1, res2, res3;
  __mmask16 mask = MASK_VALUE;
  float res_ref[16];
  int i;

  for (i = 0; i < 16; i++)
    {
      src.a[i] = 179.345 - 6.5645 * i;
      res2.a[i] = DEFAULT_VALUE;
    }

  res1.x = _mm512_exp2a23_ps (src.x);
  res2.x = _mm512_mask_exp2a23_ps (res2.x, mask, src.x);
  res3.x = _mm512_maskz_exp2a23_ps (mask, src.x);

  compute_vexp2ps (src.a, res_ref);

  if (check_rough_union512 (res1, res_ref, 0.0001))
    abort ();

  MASK_MERGE ()(res_ref, mask, 16);
  if (check_rough_union512 (res2, res_ref, 0.0001))
    abort ();

  MASK_ZERO ()(res_ref, mask, 16);
  if (check_rough_union512 (res3, res_ref, 0.0001))
    abort ();
}
开发者ID:maqayum,项目名称:gcc-libitm,代码行数:31,代码来源:avx512er-vexp2ps-2.c


示例14: TEST

void
TEST (void)
{
  UNION_TYPE (AVX512F_LEN, i_w) s1, s2, res1, res2, res3;
  short res_ref[SIZE];
  MASK_TYPE mask = MASK_VALUE;
  int i;
  int fail = 0;

  for (i = 0; i < SIZE; i++)
    {
      s1.a[i] = i * 17 + i;
      s2.a[i] = i * -17 + i * 2;
      res2.a[i] = DEFAULT_VALUE;
    }

  res1.x = INTRINSIC (_maddubs_epi16) (s1.x, s2.x);
  res2.x = INTRINSIC (_mask_maddubs_epi16) (res2.x, mask, s1.x, s2.x);
  res3.x = INTRINSIC (_maskz_maddubs_epi16) (mask, s1.x, s2.x);

  CALC(s1.a, s2.a, res_ref);

  if (UNION_CHECK (AVX512F_LEN, i_w) (res1, res_ref))
    abort ();

  MASK_MERGE (i_w) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, i_w) (res2, res_ref))
    abort ();

  MASK_ZERO (i_w) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, i_w) (res3, res_ref))
    abort ();
}
开发者ID:Automatic,项目名称:firmware-gcc,代码行数:33,代码来源:avx512bw-vpmaddubsw-2.c


示例15: TEST

static void
TEST (void)
{
  int ck[SIZE];
  int i;
  UNION_TYPE (AVX512F_LEN, i_d) s, d, dm, dz;
  MASK_TYPE mask = MASK_VALUE;

  for (i = 0; i < SIZE; i++)
    {
      s.a[i] = i * 7 + (i << 15) + 356;
      d.a[i] = DEFAULT_VALUE;
      dm.a[i] = DEFAULT_VALUE;
      dz.a[i] = DEFAULT_VALUE;
    }

  CALC (s.a, ck);

  d.x = INTRINSIC (_abs_epi32) (s.x);
  dz.x = INTRINSIC (_maskz_abs_epi32) (mask, s.x);
  dm.x = INTRINSIC (_mask_abs_epi32) (dm.x, mask, s.x);

  if (UNION_CHECK (AVX512F_LEN, i_d) (d, ck))
    abort ();

  MASK_MERGE (i_d) (ck, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, i_d) (dm, ck))
    abort ();

  MASK_ZERO (i_d) (ck, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, i_d) (dz, ck))
    abort ();
}
开发者ID:crizeridsdf,项目名称:gcc,代码行数:33,代码来源:avx512f-vpabsd-2.c


示例16: TEST

void
TEST (void)
{
  int i, j;
  UNION_TYPE (AVX512F_LEN, i_b) s1, s2, res, ind;
  char res_ref[SIZE];

  MASK_TYPE mask = MASK_VALUE;

  for (i = 0; i < NUM; i++)
    {
      for (j = 0; j < SIZE; j++)
	{
	  ind.a[j] = DEFAULT_VALUE;
	  s1.a[j] = i * 2 * j + 1;
	  s2.a[j] = i * 2 * j;

	  res.a[j] = DEFAULT_VALUE;
	}

      CALC (res_ref, s1.a, ind.a, s2.a);

      res.x =
	INTRINSIC (_mask2_permutex2var_epi8) (s1.x, ind.x, mask,
					       s2.x);

      MASK_MERGE (i_b) (res_ref, mask, SIZE);
      if (UNION_CHECK (AVX512F_LEN, i_b) (res, res_ref))
	abort ();
    }
}
开发者ID:Automatic,项目名称:firmware-gcc,代码行数:31,代码来源:avx512vbmi-vpermi2b-2.c


示例17: TEST

void
TEST (void)
{
  int i, sign;
  UNION_TYPE (AVX512F_LEN, d) res1, res2, res3;
  UNION_TYPE (128, d) src;
  MASK_TYPE mask = MASK_VALUE;
  double res_ref[SIZE];

  sign = -1;
  for (i = 0; i < 2; i++)
    {
      src.a[i] = 1.5 + 34.67 * i * sign;
      sign = sign * -1;
    }
  for (i = 0; i < SIZE; i++)
    res2.a[i] = DEFAULT_VALUE;

  res1.x = INTRINSIC (_broadcastsd_pd) (src.x);
  res2.x = INTRINSIC (_mask_broadcastsd_pd) (res2.x, mask, src.x);
  res3.x = INTRINSIC (_maskz_broadcastsd_pd) (mask, src.x);

  CALC (res_ref, src.a);

  if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
    abort ();

  MASK_MERGE (d) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
    abort ();

  MASK_ZERO (d) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
    abort ();
}
开发者ID:0day-ci,项目名称:gcc,代码行数:35,代码来源:avx512f-vbroadcastsd-2.c


示例18: TEST

void static
TEST (void)
{
  int i;
  UNION_TYPE (AVX512F_LEN, i_d) s1, s2, res, ind;
  int res_ref[SIZE];

  MASK_TYPE mask = MASK_VALUE;

  for (i = 0; i < SIZE; i++)
    {
      ind.a[i] = DEFAULT_VALUE;
      s1.a[i] = 34 * i + 1;
      s2.a[i] = 34 * i;

      res.a[i] = DEFAULT_VALUE;
    }

  CALC (res_ref, s1.a, ind.a, s2.a);

  res.x =
    INTRINSIC (_mask2_permutex2var_epi32) (s1.x, ind.x, mask, s2.x);

  MASK_MERGE (i_d) (res_ref, mask, SIZE);
  if (UNION_CHECK (AVX512F_LEN, i_d) (res, res_ref))
    abort ();
}
开发者ID:AlissonLinhares,项目名称:NativeKit,代码行数:27,代码来源:avx512f-vpermi2d-2.c


示例19: TEST

static void
TEST (void)
{
  UNION_TYPE (AVX512F_LEN, d) s;
  UNION_TYPE (AVX512F_LEN_HALF, i_d) res1, res2, res3;
  MASK_TYPE mask = MASK_VALUE;
  int res_ref[DST_SIZE] = { 0 };
  int i, sign = 1;

  for (i = 0; i < SRC_SIZE; i++)
    {
      s.a[i] = 123.456 * (i + 2000) * sign;
      sign = -sign;
    }

  for (i = 0; i < DST_SIZE; i++)
    res2.a[i] = DEFAULT_VALUE;

  res1.x = INTRINSIC (_cvtpd_epi32) (s.x);
  res2.x = INTRINSIC (_mask_cvtpd_epi32) (res2.x, mask, s.x);
  res3.x = INTRINSIC (_maskz_cvtpd_epi32) (mask, s.x);

  CALC (s.a, res_ref);

  if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res1, res_ref))
    abort ();

  MASK_MERGE (i_d) (res_ref, mask, SRC_SIZE);
  if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res2, res_ref))
    abort ();

  MASK_ZERO (i_d) (res_ref, mask, SRC_SIZE);
  if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res3, res_ref))
    abort ();
}
开发者ID:crizeridsdf,项目名称:gcc,代码行数:35,代码来源:avx512f-vcvtpd2dq-2.c


示例20: avx512f_test

void
avx512f_test (void)
{
  int i, sign;
  union128 res1, res2, res3, src1, src2;
  MASK_TYPE mask = MASK_VALUE;
  float res_ref[SIZE];

  sign = -1;
  for (i = 0; i < SIZE; i++)
    {
      src1.a[i] = 1.5 + 34.67 * i * sign;
      src2.a[i] = -22.17 * i * sign + 1.0;
      sign = sign * -1;
    }
  for (i = 0; i < SIZE; i++)
      res2.a[i] = DEFAULT_VALUE;

  res1.x = _mm_min_round_ss (src1.x, src2.x, _MM_FROUND_NO_EXC);
  res2.x = _mm_mask_min_round_ss (res2.x, mask, src1.x, src2.x, _MM_FROUND_NO_EXC);
  res3.x = _mm_maskz_min_round_ss (mask, src1.x, src2.x, _MM_FROUND_NO_EXC);

  calc_min (res_ref, src1.a, src2.a);

  if (check_union128 (res1, res_ref))
    abort();
  
  MASK_MERGE () (res_ref, mask, 1);
  if (check_union128 (res2, res_ref))
    abort ();

  MASK_ZERO () (res_ref, mask, 1);
  if (check_union128 (res3, res_ref))
    abort ();
}
开发者ID:gmarkall,项目名称:gcc,代码行数:35,代码来源:avx512f-vminss-2.c



注:本文中的MASK_MERGE函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ MASK_ZERO函数代码示例发布时间:2022-05-30
下一篇:
C++ MASK函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap