Thanks! Your video is very helpful.
Here is the updated example code for anyone who has the same issue and found this topic:
function main()
a = Minij(3)
for i = 1:1
g(1:2, 1)
@inbounds g(1:2, -1)
a[2, 2]
@inbounds a[2, -1]
end
end
main()
Things should be moved into a function to ensure type stability.