mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-24 16:13:38 +03:00
Add probabability distribution utility code.
Add probabability distribution utility code that enables generation of random deviates drawn from normal, Chi-square, and Gamma distributions. Fix format strings in several of the assert_* macros (remove a %s). Clean up header issues; it's critical that system headers are not included after internal definitions potentially do things like: #define inline Fix the build system to incorporate header dependencies for the test library C files.
This commit is contained in:
parent
80061b6df0
commit
b1941c6150
11 changed files with 731 additions and 48 deletions
|
|
@ -1,6 +1,14 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <windows.h>
|
||||
#else
|
||||
# include <pthread.h>
|
||||
#endif
|
||||
|
||||
/******************************************************************************/
|
||||
/*
|
||||
|
|
@ -37,6 +45,13 @@
|
|||
|
||||
#include "test/jemalloc_test_defs.h"
|
||||
|
||||
#if defined(HAVE_ALTIVEC) && !defined(__APPLE__)
|
||||
# include <altivec.h>
|
||||
#endif
|
||||
#ifdef HAVE_SSE2
|
||||
# include <emmintrin.h>
|
||||
#endif
|
||||
|
||||
/******************************************************************************/
|
||||
/*
|
||||
* For unit tests, expose all public and private interfaces.
|
||||
|
|
@ -60,7 +75,6 @@
|
|||
# define JEMALLOC_N(n) @private_namespace@##n
|
||||
# include "jemalloc/internal/private_namespace.h"
|
||||
|
||||
# include <inttypes.h>
|
||||
# include <stdarg.h>
|
||||
# include <errno.h>
|
||||
# define JEMALLOC_H_TYPES
|
||||
|
|
@ -109,6 +123,7 @@
|
|||
/*
|
||||
* Common test utilities.
|
||||
*/
|
||||
#include "test/math.h"
|
||||
#include "test/test.h"
|
||||
#include "test/thread.h"
|
||||
#define MEXP 19937
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue