Page 1 of 1
OpenCL 1.0 Support?
Posted: Fri Apr 09, 2010 4:04 pm
by Num3
OpenCLâ„¢ is the first open, royalty-free standard for cross-platform, parallel programming of modern processors found in personal computers, servers and handheld/embedded devices. OpenCL (Open Computing Language) greatly improves speed and responsiveness for a wide spectrum of applications in numerous market categories from gaming and entertainment to scientific and medical software.
In plain english, "OpenCL gives any application access to the Graphical Processing Unit for non-graphical computing."
Since all new (AMD/NVIDIA) graphic cards support OpenCL, my request is...
Any chance for OpenCL API to be included has a library of Purebasic?
I believe PB would benefit a lot by allowing to use OpenCL from it's compiler!
Here's the quick guide
http://www.khronos.org/files/opencl-qui ... e-card.pdf
And it's home
http://www.khronos.org/opencl/
Re: OpenCL 1.0 Support?
Posted: Fri Apr 09, 2010 4:06 pm
by Fred
Feel free to import it via Import/endImport, creating program in CL language is far from easy and not beginners oriented

.
Re: OpenCL 1.0 Support?
Posted: Fri Apr 09, 2010 4:21 pm
by Num3
Or that

!
I'll sink into it this week end
Re: OpenCL 1.0 Support?
Posted: Fri Apr 09, 2010 4:57 pm
by DarkDragon
Num3 wrote:
Or that

!
I'll sink into it this week end
Thanks. Maybe you could share your imports and defines with us? Btw.: They have idl files for the opengl headers, maybe they also have idl files for the opencl headers on their webpage. IDL is a general headerdefinition language, maybe you could try to be conform with that then.
Re: OpenCL 1.0 Support?
Posted: Fri Nov 19, 2010 1:26 pm
by eriansa
Could be the future! Now that octacores are coming and intel is giving alpha opencl free.
But man, I really do not understand how to use it

Re: OpenCL 1.0 Support?
Posted: Sat Feb 02, 2013 4:44 am
by Blankname
eriansa wrote:Could be the future! Now that octacores are coming and intel is giving alpha opencl free.
But man, I really do not understand how to use it

Quite a long bump, but personally would see if anyone has made any headway with OpenCL and PureBasic. AMD is pushing their accelerated processors big time, and will be pushing even stronger ones for many years to come (Kaveri will have around 512 GCN cores!). So OpenCL is the future of high performance computing (at least for AMD as they push HSA). Would be nice to harness all that GPU horsepower with no PCIe latency in PureBasic.

Re: OpenCL 1.0 Support?
Posted: Sat Feb 02, 2013 12:09 pm
by Fred
Re: OpenCL 1.0 Support?
Posted: Sat Feb 02, 2013 2:10 pm
by Guimauve
Yes but it didn't work. The code don't trigger any error but the calculation don't return the expected result and I don't know why.
It is because we have to use unsigned Quad to make it to work ? I don't know, you told me !
If someone can successfully make a working example, please let me know.
Best regards
Guimauve
Re: OpenCL 1.0 Support?
Posted: Sat Feb 02, 2013 5:21 pm
by Danilo
Guimauve wrote:
Yes but it didn't work. The code don't trigger any error but the calculation don't return the expected result and I don't know why.
It is because we have to use unsigned Quad to make it to work ? I don't know, you told me !
If someone can successfully make a working example, please let me know.
I think you need to look at the ATI/AMD, NVIDIA and INTEL software development kits for OpenCL
and use the functions from their SDKs, not OpenCL directly. ( links at
http://en.wikipedia.org/wiki/Opencl )
OpenCL is the low level API that the manufacturers use for their implementation and SDKs, no?
Re: OpenCL 1.0 Support?
Posted: Sat Feb 02, 2013 8:14 pm
by Guimauve
No, if you use their SDK (AMD/ATI or NVIDIA) if you create a program with one of them it will not work with the other one and vice versa. So it's better to use OpenCL directly.
My question is : What happen when the OpenCL command need an unsigned Int64 and you pass a PB Quad (signed Int 64) as parameter ?
This is why I wish to have a PB equivalent of all types available in C/C++. But Yes PureBasic is a Basic language and should limited to basic programming only so please forget this Feature Request.
Best regards
Guimauve
Re: OpenCL 1.0 Support?
Posted: Sun Feb 03, 2013 1:18 pm
by Shield
Nothing happens. They are exactly the same from the point of view of the CPU. The only difference is the interpretation. You need to make sure the bits are set correctly and that you interpret them the right way.
Re: OpenCL 1.0 Support?
Posted: Sun Feb 03, 2013 3:34 pm
by Guimauve
Shield wrote:You need to make sure the bits are set correctly and that you interpret them the right way.
That my point, we have to "Set" the sign bit manually while other language, like C/C++, it's done in background. But as I said PureBasic is a Basic language and should be limited to basic programming only.
Best regards
Guimauve
Re: OpenCL 1.0 Support?
Posted: Sun Feb 03, 2013 4:07 pm
by Shield
Of course it is easier if you have those types available.
But this feature request has been made in the stone age and we still haven't gotten unsigned types
except those for characters. Maybe they will come some day.

Re: OpenCL 1.0 Support?
Posted: Sun Feb 03, 2013 4:29 pm
by Fred