> On Mar 30, 2017, at 4:25 AM, fredvs <fi...@hotmail.com> wrote:
> 
>> 
>> how software parallelism ( in the sense of true simultaneous execution ) 
>> in a single process without using ( OS dependent ) threads can be achieved
>> ? 
> 
> Huh, it is exactly was I do not understand...

Look at an OpenCL tutorial for more information. If you select a CPU device 
(instead of a GPU device with hundreds of compute units) then the API will 
automatically allocate the amount of threads available on the all cores 
available (which may be only 2). It’s still threaded but scales easily 
depending on the task. I don’t know why but I got the OpenCL CPU target to 
process multiple times faster than just using the CPU directly.

Parallelism is only helpful if you have a problem involving massive amounts of 
discrete tasks which are part of larger task and can be designed as such. If 
your problem is designed like this then you can offload the processing to the 
GPU and get some serious performance benefits. The catch is that 
reading/writing memory to the GPU is slow so unless you’re processing on large 
batches of data you’ll spend more time accessing memory than processing.

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to