Created
March 26, 2020 19:25
-
-
Save menangen/b05640e3596bdf2ed325f57757eace26 to your computer and use it in GitHub Desktop.
Intel/AMD random Intrinsic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// main.c | |
// rdrand | |
// | |
// Created by menangen on 26.03.2020. | |
// Copyright © 2020 menangen. All rights reserved. | |
// | |
#include <stdio.h> | |
#include <immintrin.h> | |
int main(int argc, const char * argv[]) { | |
uint16_t res; | |
uint8_t i = 0; | |
while (i < 100) { | |
_rdrand16_step(&res); | |
printf("%u\n", res); | |
i++; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment