Its a bit frustrating when you have an 80 Terraflop GPU that does all the computation in 20 ms and then taking 200 ms per plot, so I guess we are going to implement it our own. Is there a fast png library that wont bottleneck again?
Very nice, thanks a lot. The solution we had at the end was using ParralelStencil
@parallel_indices (i, j) function heatmap_para!(image, array, min_val, max_val, table)
x = (array[i, j] - min_val) / (max_val - min_val)
for k in 1:3
col = 0.0
for l in 1:6
col *= x
col += table[k, 7-l]
end
image[j, i, k] = clamp(col, 0, 1)
end
return nothing
end