5 ms·
OpenCL "Hello World"
- hypermatt 17y agoI can't wait to see some useful applications of this.
- spitfire 17y agoSo am I. But my second thought was "Oh my GOD, how many pages of text for a single loop to run?". I'm sure they'll improve the api (with a wrapper layer), but right now OpenCL will only be used by the more demanding of applications. EDIT: Maybe that sounded wrong. For huge classes of problems this isn't an issue, but to really pull that power down to the everyday developer, an easier wrapper api will be needed. I can see spreadsheets using this stuff, but not as it stands now. On the other hand a gpgpu raytracer could use opencl as it stands now.
- eru 17y agoWhy not spreadsheets? The end-user would not be bothered with this stuff.
- ncarlson 17y agoNew drugs have been designed for a few years now using GPU computing.
- JBiserkov 17y agoNew drugs may be required so programmers won't notice the monstrosities going on. What's the deal with const char *KernelSource = HUGE_MULTILINE_STRING_WITH_EXPLICIT_\n ??? Its worse than SQL statements embedded inside GUI event handlers.
- rbanffy 17y agoI can't wait for support in other languages.
- eworoshow 17y agoKhronos is working on C++ bindings. But having the core API in pure C should make adding bindings to other languages a (relatively) easy thing to do.
- UncleOxidant 17y agoI can't wait for a nice DSL that will generate this boilerplate code for you...
- rbanffy 17y agoNo no! Wrong approach. You want the DSL to run your code, not to generate code you can't hope to understand.
- ruslan 17y agoNobody can beat this masterpiece of classics: int main(void) { printf("Hello, world!\n"); return 0; }
- derefr 17y agoMaybe not in terms of execution time, but in maintainability and set-up time, nothing beats: echo Hello, world!
- slava_pestov 17y agoSo how does Ruby's performance on vector code compare with OpenCL?
- zandorg 17y agoYes, but what about: void main(void) { printf("Hello, world!\n"); } ;-)
- deleted 17y ago[deleted]
- tvon 17y agoNone of those examples actually demonstrate anything useful (except maybe the last one which I don't understand).
- dchest 17y agoHave you read the first sentence under the title? This chapter guides you through the creation of a simple OpenCL application that performs calculations on a data set.
- n8agrin 17y agoDo you understand the problem that OpenCL is trying to solve? Literally printing "Hello World" would be a useless example. As others have noted the example is appropriate, as it preforms calculations on dataset, something that can potentially benefit greatly by accessing multiple CPUs.
- electronslave 17y agoHello boilerplate.