title: how to preload a large array to cache in parallel?
body: <p>My machine is Intel IvyBride architecture. My L3 cache is 12MB, 16way-associative, cache line size 64B.</p>
  
  <p>I have a very large array long array[12MB/sizeof(long)] in my program. I want to preload the large array before the program execute to speed up the initialization process. </p>
  
  <p>One way I can think out to achieve this is accessing the whole array from index 0 to the end of the array "in sequence". However, the time to accessing the whole array is too large. This approach uses one core.</p>
  
  <p>Another way I can do is using several threads to parallelly accessing the whole array. Each thread accesses only a part of the array. Since these threads can run on several cores, this could speed up preloading the array to the shared cache. However, this approach needs multi-cores to run these threads. </p>
  
  <p><strong>My question is:</strong>
  Is there any hardware (like DMA) I can use to issue a command and make the hardware to preload a bunch of data to the shared cache?</p>