提交 cbae9946 authored 作者: notoraptor's avatar notoraptor

Make code less confusing.

上级 42e72e40
...@@ -1033,7 +1033,7 @@ def openblas_threads_text(): ...@@ -1033,7 +1033,7 @@ def openblas_threads_text():
def blas_header_version(): def blas_header_version():
# Version for the base header # Version for the base header
version = (6,) version = (7,)
if detect_macos_sdot_bug(): if detect_macos_sdot_bug():
if detect_macos_sdot_bug.fix_works: if detect_macos_sdot_bug.fix_works:
# Version with fix # Version with fix
......
...@@ -305,11 +305,12 @@ void %(precision)sgemv_( ...@@ -305,11 +305,12 @@ void %(precision)sgemv_(
// Compute matrix product: (1, N) * (N, 1) => (1, 1) // Compute matrix product: (1, N) * (N, 1) => (1, 1)
PyArray_MatrixProduct2(vector_x, vector_y, dot_product); PyArray_MatrixProduct2(vector_x, vector_y, dot_product);
if (PyErr_Occurred())
alt_fatal_error("NumPy %(precision)sdot_ implementation: unable to compute dot.");
// PyArray_MatrixProduct2 adds an extra reference to the output array. // PyArray_MatrixProduct2 adds an extra reference to the output array.
Py_XDECREF(dot_product); Py_XDECREF(dot_product);
// Get result.
if (PyErr_Occurred())
alt_fatal_error("NumPy %(precision)sdot_ implementation: unable to compute dot.");
Py_XDECREF(dot_product); Py_XDECREF(dot_product);
Py_XDECREF(vector_y); Py_XDECREF(vector_y);
Py_XDECREF(vector_x); Py_XDECREF(vector_x);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论