Created
October 21, 2022 11:36
-
-
Save gmarkall/d91971ff6fe427d00b7f532086af46bb to your computer and use it in GitHub Desktop.
Example using an overload in the CUDA target
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from numba import cuda | |
import numpy as np | |
@cuda.jit | |
def f(arr): | |
print("Sum is", arr.sum()) | |
# Prints "Sum is 10" | |
f[1, 1](np.arange(5)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment