Skip to content

Instantly share code, notes, and snippets.

@gmarkall
Created October 21, 2022 11:36
Show Gist options
  • Save gmarkall/d91971ff6fe427d00b7f532086af46bb to your computer and use it in GitHub Desktop.
Save gmarkall/d91971ff6fe427d00b7f532086af46bb to your computer and use it in GitHub Desktop.
Example using an overload in the CUDA target
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