Skip to content

Commit

Permalink
Moving to clang
Browse files Browse the repository at this point in the history
  • Loading branch information
peekxc committed Dec 12, 2023
1 parent 823717d commit 398bb7c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ jobs:
runs-on: ${{ matrix.os }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# LDFLAGS: "-Wl,-S"
CC: clang-cl
CXX: clang-cl
LDFLAGS: "-Wl,-S"
strategy:
fail-fast: false
matrix:
Expand Down
17 changes: 16 additions & 1 deletion src/primate/sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,22 @@ def matrix_function(
Number of additional Lanczos vectors to orthogonalize against when building the Krylov basis.
"""
pass
if isinstance(A, np.ndarray):
module_func = "MatrixFunction_dense"
elif issparray(A):
module_func = "MatrixFunction_sparse"
elif isinstance(A, LinearOperator):
module_func = "MatrixFunction_linop"
else:
raise ValueError(f"Invalid type '{type(A)}' supplied for operator A")

#_lanczos.MatrixFunction_sparse(A_sparse, deg, rtol, orth, **dict(function="log"))
#_lanczos.MatrixFunction_sparse(A_sparse, deg, rtol, orth, **dict(function="log"))
## Construct the instance
M = getattr(_lanczos, module_func)(A, deg, orth, **dict(function=fun))
return M



# class MatrixFunction(LinearOperator):
# """Approximates the action v |-> f(A)v """
Expand Down

0 comments on commit 398bb7c

Please sign in to comment.