Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial support for NVidia GPUs #5

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
wave equation: initialize coord arrays with int64
tkarna committed Dec 16, 2024
commit 75c7c19940124d5e74e6519353d1fc6648ba721c
4 changes: 2 additions & 2 deletions examples/wave_equation.py
Original file line number Diff line number Diff line change
@@ -115,10 +115,10 @@ def ind_arr(shape, columns=False):
"""Construct an (nx, ny) array where each row/col is an arange"""
nx, ny = shape
if columns:
ind = np.arange(0, nx * ny, 1, dtype=np.int32) % nx
ind = np.arange(0, nx * ny, 1, dtype=np.int64) % nx
ind = transpose(np.reshape(ind, (ny, nx)))
else:
ind = np.arange(0, nx * ny, 1, dtype=np.int32) % ny
ind = np.arange(0, nx * ny, 1, dtype=np.int64) % ny
ind = np.reshape(ind, (nx, ny))
return ind.astype(dtype)