Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
6539 Discussions

Can clbas_dcopy support overlapping regions for source and destination?

chollida01
Beginner
137 Views
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
137 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