|
|
@ -1,3 +1,4 @@
|
|
|
|
|
|
|
|
// C api for rngxx
|
|
|
|
#ifndef _RNGXX_H
|
|
|
|
#ifndef _RNGXX_H
|
|
|
|
#define _RNGXX_H
|
|
|
|
#define _RNGXX_H
|
|
|
|
|
|
|
|
|
|
|
@ -16,15 +17,19 @@
|
|
|
|
extern "C" {
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// -- C API types -- (C++ compat)
|
|
|
|
typedef struct Random rng_t;
|
|
|
|
typedef struct Random rng_t;
|
|
|
|
|
|
|
|
|
|
|
|
enum rng_kind {
|
|
|
|
enum rng_kind {
|
|
|
|
RNG_KIND_CRAND,
|
|
|
|
RNG_KIND_CRAND,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// -- // --
|
|
|
|
#ifndef _RNGXX_IMPL_ONLY_TYPES
|
|
|
|
#ifndef _RNGXX_IMPL_ONLY_TYPES
|
|
|
|
|
|
|
|
// -- C API functions -- (C++ NO compat)
|
|
|
|
rng_t* rng_new(enum rng_kind kind, u64 seed[static restrict 1]);
|
|
|
|
rng_t* rng_new(enum rng_kind kind, u64 seed[static restrict 1]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// -- // --
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
}
|
|
|
|