2014-02-24 01:41:38 +04:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2014 Mellanox Technologies, Inc.
|
|
|
|
* All rights reserved.
|
2014-03-13 02:37:27 +04:00
|
|
|
* Copyright (c) 2014 Cisco Systems, Inc. All rights reserved.
|
2015-06-18 19:53:20 +03:00
|
|
|
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
|
2014-02-24 01:41:38 +04:00
|
|
|
* $COPYRIGHT$
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2014-02-24 01:41:38 +04:00
|
|
|
* Additional copyrights may follow
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2014-02-24 01:41:38 +04:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2014-02-28 20:56:38 +04:00
|
|
|
#ifndef OPAL_ALFG_H
|
|
|
|
#define OPAL_ALFG_H
|
2014-02-24 01:41:38 +04:00
|
|
|
|
|
|
|
#include "opal_config.h"
|
|
|
|
|
2014-02-28 20:56:38 +04:00
|
|
|
#include "opal_stdint.h"
|
|
|
|
|
|
|
|
|
2014-02-25 03:18:35 +04:00
|
|
|
struct opal_rng_buff_t {
|
|
|
|
uint32_t alfg[127];
|
2014-02-24 01:41:38 +04:00
|
|
|
int tap1;
|
|
|
|
int tap2;
|
|
|
|
};
|
2014-02-25 03:18:35 +04:00
|
|
|
typedef struct opal_rng_buff_t opal_rng_buff_t;
|
2014-02-24 01:41:38 +04:00
|
|
|
|
|
|
|
|
2015-06-18 19:53:20 +03:00
|
|
|
/* NOTE: UNLIKE OTHER OPAL FUNCTIONS, THIS FUNCTION RETURNS A 1 IF
|
|
|
|
* SUCCESSFUL INSTEAD OF OPAL_SUCCESS */
|
2015-06-24 06:59:57 +03:00
|
|
|
OPAL_DECLSPEC int opal_srand(opal_rng_buff_t *buff, uint32_t seed);
|
2014-02-24 01:41:38 +04:00
|
|
|
|
2014-03-13 02:37:27 +04:00
|
|
|
OPAL_DECLSPEC uint32_t opal_rand(opal_rng_buff_t *buff);
|
2014-02-24 01:41:38 +04:00
|
|
|
|
2016-08-03 02:54:24 +03:00
|
|
|
OPAL_DECLSPEC int opal_random(void);
|
|
|
|
|
2014-02-28 20:56:38 +04:00
|
|
|
#endif /* OPAL_ALFG_H */
|