Parallel calculations: Difference between revisions
Content deleted Content added
Line 809: | Line 809: | ||
sys hThread[threads], id[threads], i |
sys hThread[threads], id[threads], i |
||
' |
' |
||
'START TIMER |
|||
' |
|||
⚫ | |||
' |
' |
||
for i=1 to threads |
for i=1 to threads |
||
Line 814: | Line 817: | ||
next |
next |
||
⚫ | |||
MainThread(0) 'process numbers in main thread (bottom share) |
MainThread(0) 'process numbers in main thread (bottom share) |
||
Line 825: | Line 827: | ||
CloseHandle hThread(i) |
CloseHandle hThread(i) |
||
next |
next |
||
'CAPTURE NUMBER WITH HIGHEST PRIME FACTOR |
|||
sys n,f |
sys n,f |
||
Line 831: | Line 835: | ||
next |
next |
||
'STOP TIMER |
|||
⚫ | |||
⚫ | |||
print str((t2-t1)/freq,3) " secs " numbers(n) " " f 'number with highest prime factor |
print str((t2-t1)/freq,3) " secs " numbers(n) " " f 'number with highest prime factor |