Do the parallel-for in .net 4.0 takes privilege of GPU computing automatically? Or I have to configure with some drivers so that it uses GPU.
3 Answers
No, PFX doesn't do that for you. Take a look at Microsoft Accelerator to run some code on a GPU. I recommend in particular Tomas Petricek's series of articles on F# and Accelerator.
Also watch the gpu branch of LinqOptimizer.
![](../../users/profiles/21239.webp)
- 96,120
- 20
- 187
- 273
-
2/3 of your links are also broken. – devinbost Jun 14 '15 at 01:22
-
@bostIT that's why answers are editable by anyone in SO. Answer is five years old. – Mauricio Scheffer Jun 14 '15 at 13:38
If you want to take advantage of GPU parallelism for .NET, try the open soure Brahma library, noting that in its current incarnation is .NET 3.5. It's LINQ-able, just not 4.0 parallel LINQ-able.
![](../../users/profiles/261266.webp)
- 1,052
- 13
- 20
-
I updated the link to go to the SourceForge host page. The project appears to be pretty dormant, though. – Tim Trout Jun 15 '15 at 17:40
Parallel.For
does not use the GPU in your graphics card. It uses threads, multiple cores and hyperthreading to achieve its goals. There are no drivers available that will allow Parallel.For to make use of the GPU.
The only technology that I know of that allows you to parallelize work in the GPU (other than graphical processing work) is CUDA.
![](../../users/profiles/102937.webp)
- 168,684
- 43
- 314
- 475