I am trying to optimize my code, which moves blocks of data quite often. For example:
Do k = 1, nCv
Do i = 1, nCells
cvOld(i,k) = cv(i,k)
where the declarations of cvOld and cv are:
real(kind=8), pointer :: cv(:,:), cvOld(:,:)
In C language, I think memcpy function may help to improve the performance. Do we have an equivalent one in Fortran?
And from your experience, what's the fastest way to do this data moving? I have many such loops (just moving blocks of data)
in my big code. I am not sure whether the compiler is smart enough to use optimized function.
I will truly appreciate your time and help. Thanks!