Skip to content

Instantly share code, notes, and snippets.

@akochepasov
Last active November 29, 2021 20:42
Show Gist options
  • Save akochepasov/93e9a964fce338633a24dd224ba692bf to your computer and use it in GitHub Desktop.
Save akochepasov/93e9a964fce338633a24dd224ba692bf to your computer and use it in GitHub Desktop.
MKL, oneAPI, band, BLAS
# Based on oneAPI description
# Both from C order
n, m = A.shape
ldm, lda = n, 3
ku, kl = 1, 1
B = np.zeros((lda, ldm))
for j in range(n):
k = ku - j
for i in range(max(0, j-ku), min(m, j + kl + 1)):
B[(k + i), j] = A[i, j]
B
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment