-
Notifications
You must be signed in to change notification settings - Fork 104
Expand file tree
/
Copy pathrun_tree.ps1
More file actions
33 lines (27 loc) · 856 Bytes
/
Copy pathrun_tree.ps1
File metadata and controls
33 lines (27 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# common functions
. "$PSScriptRoot\funcs.ps1"
# process args defaults
main 64 64 @args
if ($showhelp -eq $TRUE) {
Write-Output "[-n cnt] number of nodes"
Write-Output "[-b base] base offset"
Write-Output "[-s script_name] script mode"
Write-Output "[-e] emulator mode"
Write-Output "[-f] foreground mode"
Write-Output "[-h] help"
} else {
for ($cpu = $ncpu - 1; $cpu -ge 0; $cpu--) {
$links = ""
$lcpu = [Math]::Truncate(($cpu - 1) / 2)
$links += add_link $cpu $lcpu $links
$lcpu = ($cpu * 2) + 1
if ($lcpu -lt $ncpu) {
$links += add_link $cpu $lcpu $links
}
$lcpu = ($cpu * 2) + 2
if ($lcpu -lt $ncpu) {
$links += add_link $cpu $lcpu $links
}
boot_cpu_gui $front $cpu $links
}
}