Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,8 @@ if(NOT NO_CBLAS)
message (STATUS "Generating cblas.h in ${CMAKE_INSTALL_INCLUDEDIR}")
set(CBLAS_H ${CMAKE_BINARY_DIR}/generated/cblas.h)
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/cblas.h CBLAS_H_CONTENTS)
string(REPLACE "common" "openblas_config" CBLAS_H_CONTENTS_NEW "${CBLAS_H_CONTENTS}")
string(REPLACE "common" "openblas_config" CBLAS_H_CONTENTS_NEW2 "${CBLAS_H_CONTENTS}")
string(REPLACE "OPENBLAS_EXPORT " "" CBLAS_H_CONTENTS_NEW "${CBLAS_H_CONTENTS_NEW2}")

# Symbol prefix/suffix settings rename exported functions, not C typedefs.
# Protect callback type names from the textual function-name rewriting below.
Expand Down
5 changes: 5 additions & 0 deletions Makefile.install
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,16 @@ ifdef SYMBOLSUFFIX
@sed 's/\(openblas_complex_\)\([^ ]*\)$(SYMBOLSUFFIX)/\1\2 /g' cblas.tmp > cblas.tmp2
@sed 's/goto[^() ]*/&$(SYMBOLSUFFIX)/g' cblas.tmp2 > cblas.tmp
endif

@sed 's/OPENBLAS_EXPORT //' cblas.tmp > cblas.tmp2
@sed 's/common/openblas_config/g' cblas.tmp2 > cblas.tmp

@sed -e 's/OPENBLAS_DOJOB_CALLBACK_TYPE/openblas_dojob_callback/g' \
-e 's/OPENBLAS_THREADS_CALLBACK_TYPE/openblas_threads_callback/g' \
-e 's/OPENBLAS_XERBLA_HANDLER_TYPE/openblas_xerbla_handler/g' \
-e 's/common/openblas_config/g' \
cblas.tmp > "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/cblas.h"

endif

ifneq ($(OSNAME), AIX)
Expand Down
4 changes: 4 additions & 0 deletions Makefile.system
Original file line number Diff line number Diff line change
Expand Up @@ -604,11 +604,13 @@ ifeq ($(F_COMPILER), GFORTRAN)
ifeq ($(C_COMPILER), $(filter $(C_COMPILER),GCC LSB))
EXPRECISION = 1
CCOMMON_OPT += -DEXPRECISION -m128bit-long-double
CCOMMON_OPT += -fvisibility=hidden
FCOMMON_OPT += -m128bit-long-double
endif
ifeq ($(C_COMPILER), CLANG)
EXPRECISION = 1
CCOMMON_OPT += -DEXPRECISION
CCOMMON_OPT += -fvisibility=hidden
FCOMMON_OPT += -m128bit-long-double
endif
endif
Expand All @@ -627,11 +629,13 @@ ifeq ($(F_COMPILER), GFORTRAN)
ifeq ($(C_COMPILER), $(filter $(C_COMPILER),GCC LSB))
EXPRECISION = 1
CCOMMON_OPT += -DEXPRECISION -m128bit-long-double
CCOMMON_OPT += -fvisibility=hidden
FCOMMON_OPT += -m128bit-long-double
endif
ifeq ($(C_COMPILER), CLANG)
EXPRECISION = 1
CCOMMON_OPT += -DEXPRECISION
CCOMMON_OPT += -fvisibility=hidden
FCOMMON_OPT += -m128bit-long-double
endif
endif
Expand Down
516 changes: 258 additions & 258 deletions cblas.h

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cmake/lapacke.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2542,4 +2542,4 @@ endforeach ()

set(lapacke_include_dir "${NETLIB_LAPACK_DIR}/LAPACKE/include")
include_directories(${lapacke_include_dir})
set_source_files_properties(${LAPACKE_SOURCES} PROPERTIES COMPILE_FLAGS "${LAPACK_CFLAGS}")
set_source_files_properties(${LAPACKE_SOURCES} PROPERTIES COMPILE_FLAGS "${LAPACK_CFLAGS} -fvisibility=default")
2 changes: 2 additions & 0 deletions cmake/system.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,7 @@ if (BUILD_HFLOAT16)
endif()
if(NOT MSVC)
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} ${CCOMMON_OPT}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
endif()
# TODO: not sure what PFLAGS is -hpa
set(PFLAGS "${PFLAGS} ${CCOMMON_OPT} -I${TOPDIR} -DPROFILE ${COMMON_PROF}")
Expand Down Expand Up @@ -805,6 +806,7 @@ if (${CMAKE_C_COMPILER_ID} MATCHES "IntelLLVM" AND ${CMAKE_SYSTEM_NAME} STREQUAL
set(LAPACK_CFLAGS "${LAPACK_CFLAGS} -DNOCHANGE")
endif ()

string(REPLACE "-fvisibility=hidden" "" LAPACK_CFLAGS ${LAPACK_CFLAGS})

if (NOT DEFINED SUFFIX)
set(SUFFIX o)
Expand Down
9 changes: 6 additions & 3 deletions common.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ extern "C" {
#define __USE_SVID
#endif

#include "exports.h"
#ifdef BUILD_KERNEL
#include "config_kernel.h"
#else
Expand Down Expand Up @@ -209,8 +210,10 @@ extern "C" {

#ifdef NEEDBUNDERSCORE
#define BLASFUNC(FUNC) FUNC##_
#define OPENBLAS_API(FUNC) OPENBLAS_EXPORT FUNC##_
#else
#define BLASFUNC(FUNC) FUNC
#define OPENBLAS_API(FUNC) OPENBLAS_EXPORT FUNC
#endif

#undef USE_PTHREAD_LOCK
Expand Down Expand Up @@ -761,13 +764,13 @@ int get_num_proc (int);
int get_node_equal (void);
#endif

void goto_set_num_threads(int);
OPENBLAS_EXPORT void goto_set_num_threads(int);

/* Cooperative cancellation of in-flight operations
* (implemented in driver/others/openblas_cancel.c). These symbols are
* exported without SYMBOLPREFIX/SYMBOLSUFFIX decoration. */
size_t *openblas_cancel_token(void);
void openblas_cancel(size_t *token, size_t loaded_token);
OPENBLAS_EXPORT void openblas_cancel(size_t *token, size_t loaded_token);

/* Internal helpers for the instrumented compute drivers. */
size_t openblas_cancel_begin(void);
Expand Down Expand Up @@ -905,7 +908,7 @@ typedef void (*openblas_xerbla_handler)(const char *name,
const blasint *info,
size_t name_length);
#endif
openblas_xerbla_handler openblas_set_xerbla(openblas_xerbla_handler handler);
OPENBLAS_EXPORT openblas_xerbla_handler openblas_set_xerbla(openblas_xerbla_handler handler);
#ifdef __cplusplus
}
#endif
Expand Down
Loading
Loading