-
Notifications
You must be signed in to change notification settings - Fork 0
/
configuration.go
47 lines (41 loc) · 1.56 KB
/
configuration.go
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package example
import (
"fmt"
"github.com/andersfylling/go-sortnet/sortnet"
"github.com/andersfylling/go-sortnet/sortnet/outputset"
)
// configurable constants
const (
// Channels also known as "N", sets the number of network channels or the sequence length.
Channels = 3
Workers = 16
FiltersLimit = 2
)
// configurable variables
var (
GeneratePermutations sortnet.GeneratePermutationsFunc = sortnet.GeneratePermutationsByBitmap
NewSet outputset.NewSet = outputset.NewPartitionedOrdered
PruningStrategy PruningStrategyType = ParallelPruning
)
type PruningStrategyType int
const (
ParallelPruning PruningStrategyType = iota
SerialPruning
)
func init() {
fmt.Println()
fmt.Println("###############################################")
fmt.Println("###############################################")
fmt.Println("#### ####")
fmt.Println("#### Proof based algorithm for finding ####")
fmt.Println("#### minimum number of comparators for a ####")
fmt.Printf("#### sorting network with %d channels. ####\n", Channels)
fmt.Println("#### ####")
fmt.Printf("#### Parallelism: %t ####\n", PruningStrategy == ParallelPruning)
fmt.Printf("#### Workers: %d ####\n", Workers)
fmt.Println("#### ####")
fmt.Println("###############################################")
fmt.Println("###############################################")
fmt.Println()
fmt.Println()
}