Click here to Skip to main content
16,016,826 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
It is very hard to use the GPU because the user has to do memory segmentation and transfer, the use of local memory and in the most applications very low performance increase 10-20x is reached.
In other hand using multithreads is easy and fast.
It would be better use 1280 threads in parallel using a low cost GPU like GTX1060 than any other openCL or CUDA based SW

What I have tried:

i tried using multithreads with OpenCL in compuret based vision algorithms using a Gigabyte Radeon R6 360 graphics board and GTX1060
Posted
Updated 16-May-18 0:19am

It is depending on what you want to do. Even multithreading isnt optimal, when a lot of short threads are running because multithreading means also overhead in the CPU.

Graphical output and low level computations are best done on GPU, computations also when the usage of the GPU leads to less CPU usage.

Try to avoid lots of threads, but less threads with more work, so setup and tear down looses weight. You may achieve that by building data packets for operations and results. So threads get an operation queue and work load.

Think about the critical work path if you have to wait for resources or preprocessed data.
 
Share this answer
 
The only one solution is to RUN C++ MULTITHREAD on GPU and completely ABANDON OPENCL or cuda forever.

I am speaking about increase the performance of a simple PC with multithread by 41x
And a improvement over a very complex opencl sw by 12x

Of course a lot of modifications on HW and drivers should be made
 
Share this answer
 
Comments
Rick York 16-May-18 12:02pm    
"Of course a lot of modifications on HW and drivers should be made"

How can that possibly be considered a viable solution?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900