OpenCL: internal implementation tests in MQL5 - page 12

 
Renat:

While the point is being made, with the documentation, post at least a list of CL special functions
 
Urain:
While we're at it, with documentation, at least post a list of CL special functions
Yeah, I can see that some of the command names do not correspond to standard notations, e.g:

in the example code - CLBufferCreate

and the OpenCL standard is CLCreateBuffer
 
Urain:
While the point is being made, with the documentation, post at least a list of CL special features
Seconded by.
 

The documentation is being written and will be updated in the coming days.

The text script is placed in CodeBase: https://www.mql5.com/ru/code/825

To work with OpenCL we will make a class to hide the dirty work with initialization and deinitialization of contexts, buffers, etc.

OpenCL Test
OpenCL Test
  • votes: 10
  • 2012.02.07
  • MetaQuotes Software
  • www.mql5.com
Небольшой рабочий пример расчета фрактала Мандельброта в OpenCL, который кардинально ускоряет расчеты по сравнению с софтверной реализацией примерно в 100 раз.
 
Urain:
While we're at it, with documentation, post at least a list of CL special features
OpenCL work is available in draft version on the website
 
Rosh:
There is a draft section on the website called Working with OpenCL
Here's another book on CUDA for reference.
Files:
CUDA-rus-book.zip  5880 kb
 

Renat, it would be very appropriate now to open (within reasonable "sand" limits) access to buffers of BitMapLabel object. That it would be possible to write video information directly into memory, and then output by simple switching of active page. Copying to a file is not an option.

// Or create a new object (something like GraphScreen) with a couple of switchable pages.

The format of the buffer is obvious: two-dimensional array of structures {ucar r, uchar g, uchar b, uchar alpha};

The size can be set forcibly, when creating the object - by the size of the screen area, or leave the option to make the virtual screen not equal in size to the output area with the ability to shift it relative to the screen.

Документация по MQL5: Основы языка / Операторы / Оператор создания объекта new
Документация по MQL5: Основы языка / Операторы / Оператор создания объекта new
  • www.mql5.com
Основы языка / Операторы / Оператор создания объекта new - Документация по MQL5
 
MetaDriver:

Renat, it would be very appropriate now to open (within reasonable "sand" limits) access to buffers of BitMapLabel object. So that you can write video information directly into memory, and then output it by simple switching of active page. Through copying to a file to exchange is not the case.

Yes, it's time. Let's implement it.

 

If you don't see processor as OpenCL device in terminal logs of new build, you can install driver from prebuilt. Both Intel and AMD processors should appear.

The driver supporting OpenCL1.2 was taken from streamsdk_2-6-RC3_win732 of AMD website.


I have got such logs:

2012.02.09 20:31:38 Terminal CPU: AuthenticAMD AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ with OpenCL 1.1 (2 units, 2009 MHz, 2047 Mb, version 2.0)

2012.02.09 20:31:38 Terminal GPU: NVIDIA Corporation GeForce 8500 GT with OpenCL 1.0 (2 units, 918 MHz, 256 Mb, version 285.62)


PS It's funny but terminal detect processor as two single core processors instead of dual core.

 
joo:

If you don't see the processor as OpenCL device in terminal log of the new build, you can install the driver from the prebuilt.

Please provide direct links to download executables from official sites.

Unfortunately, no executable files (even in archives) are allowed to be published on our sites. This is for the safety of users.