[fpc-pascal] Threading vs Parallelism ?

Ryan Joseph ryan at thealchemistguild.com
Fri Mar 31 11:49:09 CEST 2017

> On Mar 31, 2017, at 4:38 PM, Tony Whyman <tony.whyman at mccallumwhyman.com> wrote:
> For example, this distinction is very important in matrix algorithms. When operating on two matrices to produce another, the operations on each cell can be identified as n x m parallel actions at design time. At deployment time, it is often desirable to have a scalable implementation that can use anything from 1 to n x m processors to do the job. Thus you can have a design that identifies parallelism leading to an implementation that can non-parallel, partly or wholly parallel (in real time) depending on the size of the matrices and the number of processors available. 

That’s a good candidate for parallelism but you need an API like OpenCL to implement it properly so you can access the actual hardware required. From the little time I spent with OpenCL you really don’t want to (or shouldn’t) be intentionally designing your programs like this unless you have a real need for “true” parallelism with multiple compute units.

	Ryan Joseph

More information about the fpc-pascal mailing list