Suppose I have two array-of-structures (the structures have the same type, size, field offsets etc.), and I want to copy the first field of all structures in the first array onto the first field of the structures in the second array.

Do modern Intel, AMD, ARM and other CPUs support such operations other than through a sequence of load and store instructions for every corresponding structure pair?

If the answer is 'Yes', then what about the case in which the target structures do not have the same type, size and fields (i.e. when the source data stride is different that than target data stride, but both are known)?

没有正确的解决方案

其他提示

There are no special strided load/store instructions, but the hardware prefetch mechanism will detect strided accesses and start automatic prefetching once it detects a pattern (and assuming that there is spare bandwidth).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top