]> git.proxmox.com Git - ceph.git/blob - ceph/src/erasure-code/jerasure/gf-complete/include/gf_rand.h
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / erasure-code / jerasure / gf-complete / include / gf_rand.h
1 /*
2 * GF-Complete: A Comprehensive Open Source Library for Galois Field Arithmetic
3 * James S. Plank, Ethan L. Miller, Kevin M. Greenan,
4 * Benjamin A. Arnold, John A. Burnum, Adam W. Disney, Allen C. McBride.
5 *
6 * gf_rand.h
7 *
8 * Random number generation, using the "Mother of All" random number generator. */
9
10 #pragma once
11 #include <stdint.h>
12 #include <stdio.h>
13 #include <stdlib.h>
14
15 /* These are all pretty self-explanatory */
16 uint32_t MOA_Random_32();
17 uint64_t MOA_Random_64();
18 void MOA_Random_128(uint64_t *x);
19 uint32_t MOA_Random_W(int w, int zero_ok);
20 void MOA_Fill_Random_Region (void *reg, int size); /* reg should be aligned to 4 bytes, but
21 size can be anything. */
22 void MOA_Seed(uint32_t seed);