Exemple #1
0
inline int v_signmask(const v_uint16x8& a)
{
    int16x4_t m0 = vcreate_s16(CV_BIG_UINT(0x0003000200010000));
    uint16x8_t v0 = vshlq_u16(vshrq_n_u16(a.val, 15), vcombine_s16(m0, m0));
    uint64x2_t v1 = vpaddlq_u32(vpaddlq_u16(v0));
    return (int)vgetq_lane_u64(v1, 0) + ((int)vgetq_lane_u64(v1, 1) << 4);
}
Exemple #2
0
int
main (int argc, char **argv)
{
  int16x4_t in = vcreate_s16 (0xdeadbeef00000000ULL);
  int16_t src = 17;
  int16x4_t out = vld1_lane_s16 (&src, in, 1);
}
Exemple #3
0
int
main (void)
{
  int16_t arg1;
  int16x8_t arg2;
  int16_t actual;
  int16_t expected;

  arg1 = 0;
  arg2 = vcombine_s16 (vcreate_s16 (0x7fffffffa7908000ULL),
                       vcreate_s16 (0x8000d2607fff0000ULL));

  actual = vqrdmulhh_laneq_s16 (arg1, arg2, 7);
  expected = 0;

  if (expected != actual)
    abort ();

  return 0;
}
Exemple #4
0
int
main (void)
{
  int32_t arg1;
  int16_t arg2;
  int16x8_t arg3;
  int32_t actual;
  int32_t expected;

  arg1 = 0x80000000;
  arg2 = -24497;
  arg3 = vcombine_s16 (vcreate_s16 (0x008a80007fff7fffULL),
                       vcreate_s16 (0xfffffa797fff8000ULL));

  actual = vqdmlalh_laneq_s16 (arg1, arg2, arg3, 7);
  expected = -2147434654;

  if (expected != actual)
    abort ();

  return 0;
}
int
main (void)
{
  int32_t arg1;
  int16_t arg2;
  int16x8_t arg3;
  int32_t actual;
  int32_t expected;

  arg1 = -2147450881;
  arg2 = 32767;
  arg3 = vcombine_s16 (vcreate_s16 (0x359d7fff00007fffULL),
                       vcreate_s16 (0xe678ffff00008000ULL));

  actual = vqdmlslh_laneq_s16 (arg1, arg2, arg3, 4);
  expected = -32769;

  if (expected != actual)
    abort ();

  return 0;
}
int16x4_t test_vcreate_s16(uint64_t v1) {
  // CHECK: test_vcreate_s16
  return vcreate_s16(v1);
  // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
}