Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
7222 ディスカッション

Can clbas_dcopy support overlapping regions for source and destination?

chollida01
ビギナー
449件の閲覧回数
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 件の賞賛
1 返信
TimP
名誉コントリビューター III
449件の閲覧回数
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.
返信