1 /* 2 * Copyright (c) 2014 Mellanox Technologies, Inc. 3 * All rights reserved. 4 * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. 5 * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. 6 * $COPYRIGHT$ 7 * 8 * Additional copyrights may follow 9 * 10 * $HEADER$ 11 */ 12 13 #ifndef OPAL_ALFG_H 14 #define OPAL_ALFG_H 15 16 #include "opal_config.h" 17 18 #include "opal_stdint.h" 19 20 21 struct opal_rng_buff_t { 22 uint32_t alfg[127]; 23 int tap1; 24 int tap2; 25 }; 26 typedef struct opal_rng_buff_t opal_rng_buff_t; 27 28 29 /* NOTE: UNLIKE OTHER OPAL FUNCTIONS, THIS FUNCTION RETURNS A 1 IF 30 * SUCCESSFUL INSTEAD OF OPAL_SUCCESS */ 31 OPAL_DECLSPEC int opal_srand(opal_rng_buff_t *buff, uint32_t seed); 32 33 OPAL_DECLSPEC uint32_t opal_rand(opal_rng_buff_t *buff); 34 35 OPAL_DECLSPEC int opal_random(void); 36 37 #endif /* OPAL_ALFG_H */