Вверх ↑
Ответов: 60
Рейтинг: 0
#1: 2020-10-12 15:11:27 ЛС | профиль | цитата
Спасибо. У меня только 1 ядро загружается.
А вот пример программы, где каждый поток загружает одно ядро, если применять массивы.

Make(delphi)
ver(4.05 build 186)
Add(MainForm,2953706,21,105)
{
Width=971
Height=384
Caption="Wait for Multiple Objects"
Position=1
link(onCreate,13804482:doEvent1,[])
}
Add(Button,3342741,280,112)
{
Left=70
Top=15
Width=115
Caption="Start"
Data=String(ABCDEF)
link(onClick,1818191:doEvent1,[])
}
Add(Thread,9400599,441,112)
{
Delay=0
FastStop=0
link(onExec,9245367:doFor,[(637,118)(637,181)])
}
Add(Hub,1818191,329,112)
{
OutCount=4
link(onEvent1,9400599:doStart,[])
link(onEvent2,2883773:doStart,[(392,125)(392,321)])
link(onEvent3,3610323:doStart,[(378,132)(378,496)])
link(onEvent4,7322388:doStart,[(427,139)(427,706)])
}
Add(Thread,2883773,441,315)
{
Delay=0
FastStop=0
link(onExec,15157217:doFor,[(623,321)(623,363)])
}
Add(Thread,3610323,448,490)
{
Delay=0
FastStop=0
link(onExec,6553458:doFor,[(616,496)(616,524)])
}
Add(LineBreakEx,12358704,917,259)
{
Caption="H1"
Type=3
link(_Data,5953648:ObjHandle,[])
}
Add(LineBreakEx,11815744,903,427)
{
Caption="H2"
Type=3
link(_Data,9593067:ObjHandle,[])
}
Add(LineBreakEx,16371797,896,602)
{
Caption="H3"
Type=3
link(_Data,13923820:ObjHandle,[])
}
Add(LineBreakEx,4797077,588,630)
{
Caption="H1"
Type=2
}
Add(LineBreakEx,12999161,595,651)
{
Caption="H2"
Type=2
}
Add(LineBreakEx,777119,602,672)
{
Caption="H3"
Type=2
}
Add(WaitMultiple,7791455,588,700)
{
Count=3
link(onWait,1586077:doEnum,[])
link(Handle1,4797077:getVar,[])
link(Handle2,12999161:getVar,[])
link(Handle3,777119:getVar,[])
}
Add(Events,9593067,903,385)
{
Name=""
ManualReset=1
}
Add(Events,5953648,917,217)
{
Name=""
ManualReset=1
}
Add(Events,13923820,896,560)
{
Name=""
ManualReset=1
}
Add(LineBreak,12921458,875,217)
{
Caption="cr1"
link(Out,5953648:doCreate,[])
Primary=[3562615,-721,-98]
}
Add(LineBreak,4158070,854,385)
{
Caption="cr2"
link(Out,9593067:doCreate,[])
Primary=[11905685,-728,-259]
}
Add(LineBreak,10898410,854,560)
{
Caption="cr3"
link(Out,13923820:doCreate,[])
Primary=[13581513,-700,-427]
}
Add(Hub,13804482,91,119)
{
OutCount=3
link(onEvent1,3562615:In,[])
link(onEvent2,11905685:In,[])
link(onEvent3,13581513:In,[])
}
Add(For,9245367,770,175)
{
IncludeEnd=1
link(onEvent,12256453:doOperation,[])
link(onStop,5953648:doSet,[(860,188)(860,230)])
link(End,5403546:Var2,[])
}
Add(Math,12256453,994,175)
{
link(onResult,976171:doValue,[(1123,181)(1123,167)])
link(Op1,9245367:Position,[(1000,163)(888,163)(888,219)(776,219)])
link(Op2,14401824:Var2,[(1007,163)(1095,163)(1095,243)(1182,243)])
}
Add(Memory,976171,1176,161)
{
Default=Integer(0)
Point(Data)
link(onData,16336590:doAdd,[(1290,167)(1290,181)])
}
Add(Edit,8564700,777,28)
{
Left=15
Top=15
}
Add(For,15157217,742,357)
{
IncludeEnd=1
link(onEvent,10619049:doOperation,[])
link(onStop,9593067:doSet,[(838,370)(838,398)])
link(End,151197:Var2,[])
}
Add(Math,10619049,966,357)
{
link(onResult,12718577:doValue,[(1095,363)(1095,349)])
link(Op1,15157217:Position,[(972,345)(860,345)(860,401)(748,401)])
link(Op2,1542789:Var2,[(979,345)(1067,345)(1067,434)(1154,434)])
}
Add(Memory,12718577,1148,343)
{
Default=Integer(0)
Point(Data)
link(onData,8720180:doAdd,[(1227,349)(1227,363)])
}
Add(GetDataEx,5403546,777,140)
{
link(Data,8564700:Text,[])
}
Add(For,6553458,721,518)
{
IncludeEnd=1
link(onEvent,16677086:doOperation,[])
link(onStop,13923820:doSet,[(825,531)(825,573)])
link(End,151197:Var1,[(734,306)])
}
Add(Math,16677086,945,518)
{
link(onResult,13916257:doValue,[(1074,524)(1074,510)])
link(Op1,6553458:Position,[(951,506)(839,506)(839,562)(727,562)])
link(Op2,16354893:Var2,[(958,506)(1046,506)(1046,588)(1133,588)])
}
Add(Memory,13916257,1127,504)
{
Default=Integer(0)
Point(Data)
link(onData,1568353:doAdd,[])
}
Add(GetDataEx,151197,749,301)
{
link(Data,5403546:Var1,[(755,145)])
}
Add(Memo,13345728,1057,700)
{
Left=30
Top=45
Width=220
Height=275
ScrollBars=3
}
Add(ArrayEnum,1586077,686,700)
{
link(onItem,12948517:doWork2,[])
link(onEndEnum,3695970:doEnum,[(737,713)(737,734)])
link(Array,7086870:Var2,[(692,408)(692,408)(1427,408)])
}
Add(RealArray,14051834,1421,70)
{
RealArray=[]
}
Add(ArrayRW,16336590,1372,161)
{
link(Array,7086870:Var1,[(1378,131)])
link(Value,14401824:Var3,[(1392,149)(1288,149)(1288,236)])
}
Add(GetDataEx,7086870,1421,126)
{
link(Data,14051834:Array,[])
}
Add(ArrayRW,8720180,1274,343)
{
link(Array,5705375:Var1,[(1280,313)])
link(Value,1542789:Var3,[(1294,331)(1226,331)(1226,397)])
}
Add(GetDataEx,14401824,1176,231)
{
link(Data,976171:Value,[])
}
Add(GetDataEx,1542789,1148,392)
{
link(Data,12718577:Value,[])
}
Add(ArrayRW,1568353,1253,490)
{
link(Array,4005094:Var1,[(1259,464)])
link(Value,16354893:Var3,[(1273,478)(1205,478)(1205,565)])
}
Add(GetDataEx,16354893,1127,560)
{
link(Data,13916257:Value,[])
}
Add(Thread,7322388,511,700)
{
Delay=0
FastStop=0
link(onExec,7791455:doWait,[])
}
Add(RealArray,6063749,1330,252)
{
RealArray=[]
}
Add(RealArray,13261206,1323,413)
{
RealArray=[]
}
Add(ArrayEnum,3695970,756,728)
{
link(onItem,12948517:doWork3,[(823,734)])
link(onEndEnum,4166759:doEnum,[(821,741)(821,755)])
link(Array,5705375:Var2,[(762,522)(1322,522)])
}
Add(GetDataEx,5705375,1316,308)
{
Angle=1
link(Data,6063749:Array,[(1336,313)])
}
Add(HubEx,12948517,819,700)
{
link(onEvent,9517924:doWork2,[])
}
Add(ArrayEnum,4166759,854,749)
{
link(onItem,9517924:doWork3,[(914,755)])
link(Array,4005094:Var2,[(860,609)(1308,609)])
}
Add(GetDataEx,4005094,1302,459)
{
Angle=1
link(Data,13261206:Array,[(1329,464)])
}
Add(HubEx,9517924,910,700)
{
link(onEvent,13345728:doAdd,[])
}

карма: 1

0