OpenCL: internal implementation tests in MQL5 - page 53

 
'CL_DEVICE_COUNT' - undeclared identifier    Struct_OpenCL__1.mq5    105    79


The help has it, the script doesn't.


And when will this mess with identifiers end?

 
Mathemat:
'CL_DEVICE_COUNT' - undeclared identifier    Struct_OpenCL__1.mq5    105    79

in the 630 build works.
 
joo: I detected a mysterious device 1 in my computer using Professor Tychkov's method and it works faster than CL_USE_ANY and even faster than CL_USE_GPU_ONLY.

What is it? :O

Run GPU Caps, there will be plenty of information:

You probably have two devices. 0 is the host, i.e. CPU, and 1 is your discrete card.

The time difference between 125 ms and 78 ms is not so significant that it should not be considered a GetTicksCount() error.

CL_USE_ANY and CL_USE_GPU_ONLY are just "masks" for selecting devices, not individual devices.

 
Mathemat:

Run GPU Caps, there will be plenty of information:

You probably have two devices. 0 is the host, i.e. CPU, and 1 is your discrete card.

Where does the utility show this?
 
joo:
Where can you see it from the utility?

Look here:

Expand the list on the right and see what devices you have.

The host should always be zero, that's what a host is...

 
Mathemat:

And you probably have two devices. 0 is the host, i.e. CPU, and 1 is your discrete card.

Mathemat:

Look here:

Expand the list on the right and see what devices you have.

It won't add up:


 

Anyway... it's not weird. You have to have at least two devices, there's no way around it. There they are, just on different platforms.

And MT5 manages to see them regardless of platform. What does CLGetInfoInteger(0, CL_DEVICE_COUNT) tell you? It's 2, right?

 
Mathemat:

And MT5 manages to see them regardless of platform. What does CLGetInfoInteger(0, CL_DEVICE_COUNT) tell you? It's 2, right?

So 2, so what? How do you know if device 0 is the graphics card, 1 is the CPU? That's my point - you can't.

Well, of course, you can make a program OpenCL and get all the information you need internally, which device has what number. But you can't do it outside using MQL5.

 
joo:

So 2, so what? How do you know if device 0 is the graphics card, 1 is the CPU? That's what I'm saying - you can't.

Of course, you can use OpenCL and get all the information you need internally, describing the device serial number. But you can't do it outside using MQL5.

OpenCL functionality will soon be extended (added) to the language. So, there will be an opportunity to find out who is who.
 
joo: So 2, so what? How do you know if device 0 is the video card, 1 is the CPU?
You've got 0 for the graphics card?! That's amazing.