21 lines
1.3 KiB
MQL5
21 lines
1.3 KiB
MQL5
void OnStart(){
|
|
//---
|
|
int dCount=(int)CLGetInfoInteger(0,CL_DEVICE_COUNT);
|
|
Print("dCount =",dCount);
|
|
string Result;
|
|
{for(int i=0;i<dCount;i++)
|
|
{
|
|
int clCtx=CLContextCreate(i);
|
|
{if(clCtx==-1)
|
|
{
|
|
Print("============== DEVICE "+IntegerToString(i)+": ERROR in CLContextCreate"+" =================");
|
|
}else{
|
|
Print("============== DEVICE "+IntegerToString(i)+" =================");
|
|
//--- Get Info String
|
|
Result="";
|
|
CLGetInfoString(clCtx,CL_DEVICE_NAME,Result);
|
|
Print("DEVICE_NAME=",Result);
|
|
}}//if(clCtx==-1)
|
|
}}//for(int i=0;i<dCount;i++)
|
|
}//OnStart()
|
|
//
|