Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
CascadingRadium committed Feb 4, 2025
1 parent 14bfc17 commit d650dba
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 10 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ include("${PROJECT_SOURCE_DIR}/cmake/utils.cmake")
include("${PROJECT_SOURCE_DIR}/cmake/system.cmake")

if (USE_JEMALLOC)
add_definitions(-DUSE_JEMALLOC)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
find_package(Jemalloc REQUIRED)
endif()
Expand Down
4 changes: 3 additions & 1 deletion common.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ extern "C" {
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef USE_JEMALLOC
#define JEMALLOC_MANGLE
#include <jemalloc/jemalloc.h>
#include <jemalloc/jemalloc.h>
#endif

#if !defined(_MSC_VER)
#include <unistd.h>
Expand Down
4 changes: 3 additions & 1 deletion lapack-netlib/LAPACKE/include/lapack.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
#include "lapacke_mangling.h"

#include <stdlib.h>
#ifdef USE_JEMALLOC
#define JEMALLOC_MANGLE
#include <jemalloc/jemalloc.h>
#include <jemalloc/jemalloc.h>
#endif
#include <stdarg.h>
#include <inttypes.h>

Expand Down
4 changes: 3 additions & 1 deletion lapack-netlib/SRC/ctrsyl3.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#include <math.h>
#include <stdlib.h>
#ifdef USE_JEMALLOC
#define JEMALLOC_MANGLE
#include <jemalloc/jemalloc.h>
#include <jemalloc/jemalloc.h>
#endif
#include <string.h>
#include <stdio.h>
#include <complex.h>
Expand Down
4 changes: 3 additions & 1 deletion lapack-netlib/SRC/iparam2stage.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#include <math.h>
#include <stdlib.h>
#ifdef USE_JEMALLOC
#define JEMALLOC_MANGLE
#include <jemalloc/jemalloc.h>
#include <jemalloc/jemalloc.h>
#endif
#include <string.h>
#include <stdio.h>
#include <ctype.h>
Expand Down
4 changes: 3 additions & 1 deletion lapack-netlib/SRC/ztrsyl3.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#ifdef USE_JEMALLOC
#define JEMALLOC_MANGLE
#include <jemalloc/jemalloc.h>
#include <jemalloc/jemalloc.h>
#endif
#include <complex.h>
#ifdef complex
#undef complex
Expand Down
4 changes: 3 additions & 1 deletion lapack-netlib/TESTING/MATGEN/clarnd.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#include <math.h>
#include <stdlib.h>
#ifdef USE_JEMALLOC
#define JEMALLOC_MANGLE
#include <jemalloc/jemalloc.h>
#include <jemalloc/jemalloc.h>
#endif
#include <string.h>
#include <stdio.h>
#include <complex.h>
Expand Down
4 changes: 3 additions & 1 deletion lapack-netlib/TESTING/MATGEN/zlarnd.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#include <math.h>
#include <stdlib.h>
#ifdef USE_JEMALLOC
#define JEMALLOC_MANGLE
#include <jemalloc/jemalloc.h>
#include <jemalloc/jemalloc.h>
#endif
#include <string.h>
#include <stdio.h>
#include <complex.h>
Expand Down
4 changes: 3 additions & 1 deletion relapack/src/relapack.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ typedef unsigned long BLASULONG;
#include "lapack.h"
#include "blas.h"

#ifdef USE_JEMALLOC
#define JEMALLOC_MANGLE
#include <jemalloc/jemalloc.h>
#include <jemalloc/jemalloc.h>
#endif

// sytrf helper routines
void RELAPACK_ssytrf_rec2(const char *, const blasint *, const blasint *, blasint *, float *, const blasint *, blasint *, float *, const blasint *, blasint *);
Expand Down
4 changes: 3 additions & 1 deletion relapack/test/test.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
#include "lapack.h"
#include "util.h"
#include <stdlib.h>
#ifdef USE_JEMALLOC
#define JEMALLOC_MANGLE
#include <jemalloc/jemalloc.h>
#include <jemalloc/jemalloc.h>
#endif
#include <stdio.h>
#include <string.h>

Expand Down
4 changes: 3 additions & 1 deletion utest/ctest.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,10 @@ void assert_dbl_far(double exp, double real, double tol, const char* caller, int

#include <stdlib.h>

#ifdef USE_JEMALLOC
#define JEMALLOC_MANGLE
#include <jemalloc/jemalloc.h>
#include <jemalloc/jemalloc.h>
#endif

#ifdef __CTEST_APPLE
#include <dlfcn.h>
Expand Down

0 comments on commit d650dba

Please sign in to comment.