提交 e55f47ac authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Declare sdot_ static.

上级 ae3c3c7b
...@@ -94,7 +94,7 @@ def detect_macos_sdot_bug(): ...@@ -94,7 +94,7 @@ def detect_macos_sdot_bug():
test_fix_code = textwrap.dedent("""\ test_fix_code = textwrap.dedent("""\
extern "C" float sdot_(int*, float*, int*, float*, int*); extern "C" float sdot_(int*, float*, int*, float*, int*);
extern "C" float cblas_sdot(int, float*, int, float*, int); extern "C" float cblas_sdot(int, float*, int, float*, int);
float sdot_(int* Nx, float* x, int* Sx, float* y, int* Sy) static float sdot_(int* Nx, float* x, int* Sx, float* y, int* Sy)
{ {
return cblas_sdot(*Nx, x, *Sx, y, *Sy); return cblas_sdot(*Nx, x, *Sx, y, *Sy);
} }
...@@ -924,7 +924,7 @@ def blas_header_text(): ...@@ -924,7 +924,7 @@ def blas_header_text():
if detect_macos_sdot_bug.fix_works: if detect_macos_sdot_bug.fix_works:
header += textwrap.dedent("""\ header += textwrap.dedent("""\
extern "C" float cblas_sdot(int, float*, int, float*, int); extern "C" float cblas_sdot(int, float*, int, float*, int);
float sdot_(int* Nx, float* x, int* Sx, float* y, int* Sy) static float sdot_(int* Nx, float* x, int* Sx, float* y, int* Sy)
{ {
return cblas_sdot(*Nx, x, *Sx, y, *Sy); return cblas_sdot(*Nx, x, *Sx, y, *Sy);
} }
...@@ -932,7 +932,7 @@ def blas_header_text(): ...@@ -932,7 +932,7 @@ def blas_header_text():
else: else:
# Make sure the buggy version of sdot_ is never used # Make sure the buggy version of sdot_ is never used
header += textwrap.dedent("""\ header += textwrap.dedent("""\
float sdot_(int* Nx, float* x, int* Sx, float* y, int* Sy) static float sdot_(int* Nx, float* x, int* Sx, float* y, int* Sy)
{ {
fprintf(stderr, fprintf(stderr,
"FATAL: The implementation of BLAS SDOT " "FATAL: The implementation of BLAS SDOT "
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论