问题
A bit of background:
I am getting started with GPGPU (OpenCL), I am using a java wrapper (jogamp.jocl) hoping that it will provide me with a way to abstract the low level nitty gritty and use standard OOP at higher levels. I can see already from the various Hello World examples that I'll have to manage the queues myself.
My question:
Are there any known patterns for GPGPU or good resources (as in books) on design patterns for massively parallel architectures in general?
My focus is on biological simulations, but really shouldn't make a difference.
回答1:
i would say that similar patterns apply as for distributed computing for higher level abstractions. Not necessary the concurrency patters but all which help splitting tasks for parallel and independent execution. For example map/reduce. A CLCommandQueue would be used like a worker thread. Its basically just an interface to a abstract device (piece of hardware).
回答2:
Architectural Patterns for Parallel Programming
Ralph Johnson on Parallel Programming Patterns
来源:https://stackoverflow.com/questions/4984386/any-good-resources-on-design-patterns-for-parallel-architectures