Discussion of article "Understand and Efficiently use OpenCL API by Recreating built-in support as DLL on Linux (Part 2): OpenCL Simple DLL implementation"

 

New article Understand and Efficiently use OpenCL API by Recreating built-in support as DLL on Linux (Part 2): OpenCL Simple DLL implementation has been published:

Continued from the part 1 in the series, now we proceed to implement as a simple DLL then test with MetaTrader 5. This will prepare us well before developing a full-fledge OpenCL as DLL support in the following part to come.

The preparation to call clsimple_compute() would need a little more effort. We need to declare arrays of integers input, fill them with proper values, and declare an array of integers used for output. Anyway in reality, we would be reading such input data tick by tick from the asset's price and we just need to clean or prepare data on top of that slightly more before supplying them as part of arguments whenever we call clsimple_compute().

Finally we validate the result by checking value of each element in output array. If all things went well, it will print out

Passed test

So place .mqh into a proper location either at the same location as .mq5 or in Includes/ directory of MetaTrader 5 installation path, then compile such .mq5 source, and finally drag-and-drop the the built program onto a chart on MetaTrader 5.
We would see the following similar output as seen on Experts tab.

Output from testing MQL5 program on MetaTrader 5 as seen on Experts tab

Output from testing MQL5 (a Script type) program on MetaTrader 5.
Notice that text is shown properly thanks to our working string conversion utility.

Author: Wasin Thonkaew

 
Great article. Looking forward to the next articles in the series, thanks.