LibreOCL/Test/tst01.mq5

22 lines
1.3 KiB
MQL5
Raw Permalink Normal View History

2025-05-30 15:03:43 +02:00
<EFBFBD><EFBFBD>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()
//