Question

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)?

No correct solution

OTHER TIPS

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).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top