I am optimizing my code, and I wanted to know how I could access the row of a matrix directly (not making a copy of it, and pass it to a function.
right now I do:
@threads for i=1:n_rows results[i] = myfunction(MyMatrix[i,:]) end
However I was told that MyMatrix[i,:] is making a copy of the row.
How could I give to myfunction the original row ? The only solution I found yes is to rewrite myfunction(MyMatrix, m) so that it take the complete array and the row index… I think there must a more efficient solution…