Python numba: how to find position of the largest element in array -


i'm writing code real-time processing of image camera. using python 3.5 anaconda accelerate/numba packages perform of calculations on gpu. have problems implementing function find position of largest element in float32 2d array. array in gpu memory. problem is: terribly slow. bottleneck of whole code. code:

@n_cuda.jit('void(float32[:,:], float32, float32, float32)') def d_findcarpeak(temp_mat, height, width, peak_flat):     row, col = cuda.grid(2)     if row < height , col < width:         peak_flat = temp_mat.argmax() 

here call it:

d_findcarpeak[number_of_blocks, threads_per_block](             d_temp_mat, height, width, d_peak_flat) 

how can rewrite code?


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -