我已经阅读了很多关于缓存易读算法和流树等.我了解基础知识我还没有看到是为什么他们对并行编程有好处?我想我看到约翰·哈罗普(John Harrop)表示,他们是革命性的.
解决方法
在文章中
http://www.1024cores.net/home/parallel-computing/cache-oblivious-algorithms
http://www.1024cores.net/home/parallel-computing/cache-oblivious-algorithms
他们指出
@H_502_9@The idea behind cache-oblivIoUs algorithms is efficient usage of processor caches and reduction of memory bandwidth requirements. Both things are equally important for single-threaded algorithms,but especially crucial for parallel algorithms,because available memory bandwidth is usually shared between hardware threads and frequently becomes a bottleneck for scalability.
访问内存可以是并行算法中的瓶颈,因此具有尝试利用缓存内存的算法可以更有效率.
在同一篇文章中,他们继续描述缓存隐藏算法如何利用可用的缓存:
@H_502_9@Cache-oblivIoUs algorithms work by recursively dividing a problem’s dataset into smaller parts and then doing as much computations of each part as possible. Eventually subproblem dataset fits into cache,and we can do significant amount of computations on it without accessing memory