@vectorize(['float32(float32)'], target='cuda')
def gpu_cos(x):
 return math.cos(x)

@ vectorize ( [ 'float32(float32)' ] , target = 'cuda' ) def gpu_cos ( x ) : return math . cos ( x )
a simple cuda ufunc to compute the elemwise cosine .