C Board  

Go Back   C Board > General Programming Boards > C Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 12-15-2009, 12:31 AM   #1
Registered User
 
Join Date: Dec 2009
Location: Colorado
Posts: 41
OpenCL for beginner

I am interested in parallel computing and want to learn more about using OpenCL to write programs to run on my GPU. I have found some sources of information and some sample code online but it seems pretty complicated. Are there any suggestions you guys have that would be a good starting point? Thanks
waterborne is offline   Reply With Quote
Old 12-15-2009, 04:11 AM   #2
dat is, vast staat
 
MK27's Avatar
 
Join Date: Jul 2008
Location: SE Queens
Posts: 6,612
If they are as generally pathetic as the GL community* in the standards they set vis "sample code online", then there often really is NO good starting point. These people could spend 3-5 pages making how to change a lightbulb "seem pretty complicated" and it still won't be done at the end.

Usually, the hard part is dealing with this tedious and what often seems like intentionally dysfunctional documentation. Do not be discouraged however! The software itself works very well once you understand it (or at least, GL does). Just beware there are plenty of "commentators" around who perhaps want to defend their own territory by preventing you from doing that. Pathetic as it sounds, I have no doubt that it is very (and perhaps frequently) true.

So good luck. There are NO standards on the web. If you think something is badly done after a few minutes, it is probably not going to get better. Unfortunately, the more esoteric the topic, the more often you will not have any choice in the matter. Since CL will only have a fraction the documentation that GL does, I promise you will find yourself between a rock and a hard place a lot getting info.

Khronos's own stuff is probably going to be give you the best explanations of individual commands:

OpenCL 1.0 Reference Pages

Just they do not attempt to demonstrate any use of the commands in a "wholistic" context, such as complete working code, very much.

*they are under the same management
__________________
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
GDB tutorial #1 -- gnu debugger tutorials -- GDB tutorial #2
cpwiki -- our wiki on sourceforge
MK27 is offline   Reply With Quote
Old 12-15-2009, 11:48 AM   #3
Registered User
 
Join Date: Dec 2009
Location: Colorado
Posts: 41
That is what I was afraid of! Oh well, there is nothing wrong with a little (or a lot) of hard word
waterborne is offline   Reply With Quote
Old 12-15-2009, 12:56 PM   #4
Registered User
 
Join Date: Dec 2009
Posts: 1
I would definitely check out NVidia's OpenCL resources - certainly the most complete offerings I've found. In terms of it being difficult to learn, there's nothing to do but bite the bullet, grab some code and start trying to understand it

I'm trying to rewire an open-source library to pass work off to GPUs via OpenCL and need to learn C++ and C as well as understand the specific code. No way to do it but dive in!

If it's too tricky there's always Python: http://python-opencl.next-touch.com/
xbobbo is offline   Reply With Quote
Old 12-15-2009, 04:06 PM   #5
Registered User
 
Join Date: Jan 2009
Posts: 534
I would definately look into these:

OpenCL Tutorials | MacResearch
Subsonics is offline   Reply With Quote
Old 12-15-2009, 04:45 PM   #6
Registered User
 
jeffcobb's Avatar
 
Join Date: Dec 2009
Location: Henderson, NV
Posts: 887
Good Parallel Computing challenge

Not OpenCL exactly but if you can get your hands on a PS3 you can learn to code for the CellBE (single central proc and 7 (usable) co-procs to code for). When you make something run on this and run well you will know parallel coding on a whole new level.

I am not saying this is the only way; I am working on a swarm computing method on my own right now but being distributed it brings a different set of skills and challenges...
__________________
C/C++ Environment: GNU CC/Emacs
Make system: CMake
Debuggers: Valgrind/GDB
jeffcobb is offline   Reply With Quote
Old 12-16-2009, 04:18 PM   #7
Registered User
 
Join Date: Dec 2009
Location: Colorado
Posts: 41
Hey Jeff, I just got a PS3 actually. It is a newer model though so I can't load YDL on it. Can I still write and run code on there with the standard PS software on there? I really like the idea of running code on there
waterborne is offline   Reply With Quote
Old 12-17-2009, 12:52 AM   #8
Registered User
 
jeffcobb's Avatar
 
Join Date: Dec 2009
Location: Henderson, NV
Posts: 887
Quote:
Originally Posted by waterborne View Post
Hey Jeff, I just got a PS3 actually. It is a newer model though so I can't load YDL on it. Can I still write and run code on there with the standard PS software on there? I really like the idea of running code on there
My friend, that was one the area where Sony dropped the ball in later versions. I was an early adopter and had the Add Other OS option. The libraries were pretty lame and I had the chance rub shoulders with other companies like IBM and Toshiba working on an app framework .
__________________
C/C++ Environment: GNU CC/Emacs
Make system: CMake
Debuggers: Valgrind/GDB
jeffcobb is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump


All times are GMT -6. The time now is 12:18 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22