You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
930 B
31 lines
930 B
#ifndef _CRAND_H
|
|
#define _CRAND_H
|
|
|
|
#include <common.h>
|
|
|
|
#define JR_MAX (UINT64_MAX >> 16)
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct jr_state;
|
|
|
|
void _jr_seed(struct jr_state* restrict state, unsigned long with) _export(internal);
|
|
long _jr_proc(struct jr_state* restrict state) _export(internal);
|
|
double _jr_procf(struct jr_state* restrict state) _export(internal);
|
|
void _jr_free(struct jr_state* restrict state) _export(internal);
|
|
struct jr_state* _jr_alloc() _export(internal) __attribute__((malloc(_jr_free)));
|
|
|
|
struct jr_state* _jr_new(unsigned long with) _export(internal) __attribute__((malloc(_jr_free)));
|
|
|
|
double _jr_lastf(const struct jr_state* restrict state) _export(internal) _fspec(readonly);
|
|
long _jr_lastl(const struct jr_state* restrict state) _export(internal) _fspec(readonly);
|
|
unsigned short* _jr_state(struct jr_state* restrict state) _export(internal) _fspec(pure);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|