Ejemplo n.º 1
0
inline bool rdrand(
    UIntType *rand, std::integral_constant<std::size_t, sizeof(std::uint16_t)>)
{
    unsigned short r;
    int cf = _rdrand16_step(&r);
    *rand = static_cast<UIntType>(r);

    return cf != 0;
}
Ejemplo n.º 2
0
bool rdrand16(uint16_t* result)
{
  int res = 0;
  while (res == 0)
  {
    res = _rdrand16_step(result);
  }
  return (res == 1);
}
Ejemplo n.º 3
0
int __attribute__((__target__("rdrnd"))) rdrand16_step_wrap(unsigned short *p) {
  return _rdrand16_step(p);
}
Ejemplo n.º 4
0
inline int rdrand16_step(uint16_t *x) { return _rdrand16_step ( (unsigned short*) x ); }