Skip to content

Commit

Permalink
Adjusting for ARM
Browse files Browse the repository at this point in the history
  • Loading branch information
peekxc committed Dec 5, 2023
1 parent 2a44b6c commit f1b6942
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/guide/slq_guide.html
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ <h1 class="title">SLQ Trace guide</h1>
</header>

<p><code>primate</code> offers an extensible implementation of the stochastic Lanczos method (SLQ). There are many algorithms named the “stochastic Lanczos quadrature” in the literature; though each is typically related, they often have distinct goals. Pseudocode for a generic form of SLQ is given below:</p>
<div id="alg-slq" class="pseudocode-container" data-line-number="true" data-alg-title="Algorithm" data-no-end="true" data-line-number-punc=":" data-indent-size="1.1em" data-comment-delimiter="//" data-pseudocode-index="1">
<div id="alg-slq" class="pseudocode-container" data-indent-size="1.1em" data-alg-title="Algorithm" data-line-number="true" data-comment-delimiter="//" data-pseudocode-index="1" data-line-number-punc=":" data-no-end="true">
<div class="pseudocode">
\begin{algorithm} \caption{Stochastic Lanczos Quadrature} \begin{algorithmic} \Input Symmetric operator ($A \in \mathbb{R}^{n \times n}$) \Require Number of queries ($n_v$), Degree of quadrature ($k$) \Function{SLQ}{$A$, $n_v$, $k$} \State $\Gamma \gets 0$ \For{$j = 1, 2, \dots, n_v$} \State $v_i \sim \mathcal{D}$ where $\mathcal{D}$ satisfies $\mathbb{E}(v v^\top) = I$ \State $T^{(j)}(\alpha, \beta)$ $\gets$ $\mathrm{Lanczos}(A,v_j,k+1)$ \State $[\Theta, Y] \gets \mathrm{eigh\_tridiag}(T^{(j)}(\alpha, \beta))$ \State $\tau_i \gets \langle e_1, y_i \rangle$ \State &lt; Do something with the node/weight pairs $(\theta_i, \tau_i^2)$ &gt; \EndFor \EndFunction \end{algorithmic} \end{algorithm}
</div>
Expand Down
7 changes: 5 additions & 2 deletions tools/cibw_macos.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
!#/usr/bin/bash
#!/usr/bin/env bash

brew install libomp llvm openblas
export CC=/usr/bin/clang
Expand All @@ -14,4 +14,7 @@ if [[ $(uname -m) == "arm64" && "$CIBW_BUILD" == "cp38-macosx_arm64" ]]; then
curl -o /tmp/Python38.pkg https://www.python.org/ftp/python/3.8.10/python-3.8.10-macos11.pkg
sudo installer -pkg /tmp/Python38.pkg -target /
sh "/Applications/Python 3.8/Install Certificates.command"
fi
fi

echo CXX VARIABLE:
echo $CXX

0 comments on commit f1b6942

Please sign in to comment.