Jump to content

  • Log In with Google      Sign In   
  • Create Account


About OpenCL, CUDA and shaders


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Nawy   Members   -  Reputation: 127

Like
0Likes
Like

Posted 08 October 2013 - 12:59 PM

Not a long time ago I read article about OpenCL. The article said, OpenCL is different from CUDA in independent of the hardware ability. OpenCL is independent of the hardware side, and CUDA is depends of the hardware? Hah, It's crazy thought. No of course! Am I right? And I believe that OpenCL/CUDA use for a NO graphical compute, but  shaders use for a graphical compute. Am I right? Please, will advice. What use CUDA/OpenCL? What are their differences?



Sponsor:

#2 cadjunkie   Members   -  Reputation: 1272

Like
0Likes
Like

Posted 09 October 2013 - 07:13 AM

AFAIK, CUDA was something cooked up by NVIDIA specifically to do GPU programming for their hardware. OpenCL is Khronos Group's implementation of a hardware independent GPU programming library, so that you can write it once and port it to all graphics cards (in theory), kinda like OpenGL does for graphics. 



#3 Bacterius   Crossbones+   -  Reputation: 8134

Like
2Likes
Like

Posted 09 October 2013 - 06:09 PM

AFAIK, CUDA was something cooked up by NVIDIA specifically to do GPU programming for their hardware. OpenCL is Khronos Group's implementation of a hardware independent GPU programming library, so that you can write it once and port it to all graphics cards (in theory), kinda like OpenGL does for graphics. 

 

Correction: OpenCL is a specification, and vendors design hardware and implement their drivers to conform to the specification. CUDA is not the same, since it is available from only one vendor it is just a GPGPU API very similar to OpenCL. In fact, the NVIDIA driver used to implement OpenCL by translating it to CUDA behind the scenes, though nowadays they have just stopped supporting later versions of OpenCL iirc. It makes better use of NVIDIA hardware by virtue of being designed specifically for it.

 

OpenCL and CUDA can both do graphics-related tasks, they both have a concept of textures and can use the sampling units, and can interoperate (to some extent) with OpenGL and DirectX resources. Whether it is worth using them in your application is up to you to decide. Note some graphics API's already provide their own tightly-coupled "compute languages", e.g. DirectX's compute shaders with HLSL which are easier to manage if you are already using DirectX to start off with. But people have written raytracers in CUDA and OpenCL, so it's completely possible.


The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS