File tree Expand file tree Collapse file tree 3 files changed +31
-23
lines changed
Expand file tree Collapse file tree 3 files changed +31
-23
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ extern "C" {
5757#define __USE_SVID
5858#endif
5959
60+ #include "exports.h"
6061#ifdef BUILD_KERNEL
6162#include "config_kernel.h"
6263#else
@@ -424,29 +425,6 @@ please https://github.com/xianyi/OpenBLAS/issues/246
424425#define BLAS3_MEM_ALLOC_THRESHOLD 32
425426#endif
426427
427- /***
428- For GCC/Clang, always use -fvisibility=hidden. Then mark exported function
429- implementations with OPENBLAS_EXPORT. For MSVC, using `__declspec` onces makes
430- the default atrribute for any function in the entire shared object hidden
431- (observed behaviour, documentation source needed).
432- **/
433- #if defined (_WIN32 ) || defined (__CYGWIN__ )
434- # if defined (__GNUC__ )
435- /* GCC */
436- # define OPENBLAS_EXPORT __attribute__ ((dllexport))
437- # define OPENBLAS_IMPORT __attribute__ ((dllimport))
438- # else
439- /* MSVC */
440- # define OPENBLAS_EXPORT __declspec(dllexport)
441- # define OPENBLAS_IMPORT __declspec(dllimport)
442- # endif
443- #else
444- /* All other platforms. */
445- # define OPENBLAS_EXPORT __attribute__ ((visibility ("default")))
446- # define OPENBLAS_IMPORT
447- #endif
448-
449-
450428#ifdef QUAD_PRECISION
451429#include "common_quad.h"
452430#endif
Original file line number Diff line number Diff line change 1+ #ifndef EXPORTS_H
2+ #define EXPORTS_H
3+
4+ #pragma once
5+
6+ /***
7+ * For GCC/Clang, always use -fvisibility=hidden. Then mark exported function
8+ * implementations with OPENBLAS_EXPORT. For MSVC, using `__declspec` onces makes
9+ * the default atrribute for any function in the entire shared object hidden
10+ * (observed behaviour, documentation source needed).
11+ * **/
12+ #if defined (_WIN32 ) || defined (__CYGWIN__ )
13+ # if defined (__GNUC__ )
14+ /* GCC */
15+ # define OPENBLAS_EXPORT __attribute__ ((dllexport))
16+ # define OPENBLAS_IMPORT __attribute__ ((dllimport))
17+ # else
18+ /* MSVC */
19+ # define OPENBLAS_EXPORT __declspec(dllexport)
20+ # define OPENBLAS_IMPORT __declspec(dllimport)
21+ # endif
22+ #else
23+ /* All other platforms. */
24+ # define OPENBLAS_EXPORT __attribute__ ((visibility ("default")))
25+ # define OPENBLAS_IMPORT
26+ #endif
27+
28+
29+ #endif // EXPORTS_H
Original file line number Diff line number Diff line change 3737/*********************************************************************/
3838
3939#include <ctype.h>
40+ #include "exports.h"
4041
4142OPENBLAS_EXPORT
4243int NAME (const char * A , const char * B ){
You can’t perform that action at this time.
0 commit comments