문제

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