views:

229

answers:

1

Well the title says it, I'm doing following kind of operations in Fortran:

a(:,t) = b(:,t)
c(:,t) = x(i,t)*d(:,t)

Is there any benefits of using daxpy and dcopy subroutines from BLAS in this case where inc=1?

+2  A: 

No difference you would ever notice.

BLAS has to be compatible with Fortran 77, that I'm pretty sure didn't have those fancy features.

Those subroutines are in there to make array or matrix copying 1 line of code, because it's done quite a lot. Cycles tend to get hogged in other routines, like matrix inverse, so copying is not usually a performance issue.

If you're worried about performance, just code it up in a reasonable way. Then what I would do is interrupt it a few times. This will show you where the time's actually going. If it is spending much time in copying, it will tell you. If not, it will tell you.

Mike Dunlavey