Community
cancel
Showing results for 
Search instead for 
Did you mean: 
chollida01
Beginner
38 Views

Can clbas_dcopy support overlapping regions for source and destination?

I couldn't seem to find this in the docs, though I'm sure it's specified somewhere.

Can cblas_?copy support overlapping regions for the source and destinations vectors?
0 Kudos
1 Reply
TimP
Black Belt
38 Views

Underlying code works the same as public source versions. According to Fortran rules, overlap isn't permitted, as if the prototypes were defined with *restrict. In practice, it will likely work OK with overlap, if copying toward smaller addresses with positive increment parameters, or toward larger addresses with negative increments.
memmove() is fairly efficient in most current implementations (maybe better than ?copy for the case of both increments negative), so it may not make sense to use ?copy in such cases.
Reply