Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Informatik 8
CoPaR
Commits
6261d8d8
Commit
6261d8d8
authored
Sep 25, 2018
by
Hans-Peter Deifel
Browse files
Fix whitespace
parent
529cf189
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
bench/MA/Algorithm/BenchSplit.hs
View file @
6261d8d8
...
...
@@ -9,7 +9,6 @@ import Control.Monad.ST
import
Control.Monad.Reader
import
qualified
Data.Vector
as
V
import
Control.DeepSeq
import
System.Time.Extra
(
sleep
)
import
MA.Algorithm.Types
import
MA.Algorithm.Split
...
...
@@ -32,46 +31,38 @@ benchmarks = bgroup "MA.Algorithm.Split" [benchCollectTouchedBlocks]
benchCollectTouchedBlocks
::
Benchmark
benchCollectTouchedBlocks
=
bgroup
"collectTouchedBlocks"
[
bench
"no predecessor edges, 1 state"
$
withInit
@
Powerset
(
enc
[
False
]
[]
)
(
return
()
)
(
\
()
->
collectTouchedBlocks
(
Block
0
))
,
bench
"no predecessor edges, 2 states"
$
withInit
@
Powerset
(
enc
[
False
,
False
]
[]
)
(
return
()
)
(
\
()
->
collectTouchedBlocks
(
Block
0
))
,
bench
"no predecessor edges, 10 states"
$
withInit
@
Powerset
(
enc
(
replicate
10
False
)
[]
)
(
return
()
)
(
\
()
->
collectTouchedBlocks
(
Block
0
))
,
bench
"no predecessor edges, 100 states"
$
withInit
@
Powerset
(
enc
(
replicate
100
False
)
[]
)
(
return
()
)
(
\
()
->
collectTouchedBlocks
(
Block
0
))
,
bench
"one origin state, 1 normal"
$
withInit
@
Powerset
(
enc
[
True
,
False
]
[(
0
,
()
,
1
)])
(
return
()
)
(
\
()
->
collectTouchedBlocks
(
Block
1
))
,
bench
"one origin state, 2 normal"
$
withInit
@
Powerset
(
enc
[
True
,
False
,
False
]
[(
0
,
()
,
1
),
(
0
,
()
,
2
)])
(
return
()
)
(
\
()
->
collectTouchedBlocks
(
Block
1
))
,
bench
"one origin state, 10 normal"
$
withInit
@
Powerset
(
enc
(
True
:
replicate
10
False
)
[(
0
,
()
,
to
)
|
to
<-
[
1
..
10
]])
(
return
()
)
(
\
()
->
collectTouchedBlocks
(
Block
1
))
,
bench
"one origin state, 100 normal"
$
withInit
@
Powerset
(
enc
(
True
:
replicate
100
False
)
[(
0
,
()
,
to
)
|
to
<-
[
1
..
100
]])
(
return
()
)
(
\
()
->
collectTouchedBlocks
(
Block
1
))
[
bench
"no predecessor edges, 1 state"
$
withInit
@
Powerset
(
enc
[
False
]
[]
)
(
return
()
)
(
\
()
->
collectTouchedBlocks
(
Block
0
))
,
bench
"no predecessor edges, 2 states"
$
withInit
@
Powerset
(
enc
[
False
,
False
]
[]
)
(
return
()
)
(
\
()
->
collectTouchedBlocks
(
Block
0
))
,
bench
"no predecessor edges, 10 states"
$
withInit
@
Powerset
(
enc
(
replicate
10
False
)
[]
)
(
return
()
)
(
\
()
->
collectTouchedBlocks
(
Block
0
))
,
bench
"no predecessor edges, 100 states"
$
withInit
@
Powerset
(
enc
(
replicate
100
False
)
[]
)
(
return
()
)
(
\
()
->
collectTouchedBlocks
(
Block
0
))
,
bench
"one origin state, 1 normal"
$
withInit
@
Powerset
(
enc
[
True
,
False
]
[(
0
,
()
,
1
)])
(
return
()
)
(
\
()
->
collectTouchedBlocks
(
Block
1
))
,
bench
"one origin state, 2 normal"
$
withInit
@
Powerset
(
enc
[
True
,
False
,
False
]
[(
0
,
()
,
1
),
(
0
,
()
,
2
)])
(
return
()
)
(
\
()
->
collectTouchedBlocks
(
Block
1
))
,
bench
"one origin state, 10 normal"
$
withInit
@
Powerset
(
enc
(
True
:
replicate
10
False
)
[
(
0
,
()
,
to
)
|
to
<-
[
1
..
10
]
])
(
return
()
)
(
\
()
->
collectTouchedBlocks
(
Block
1
))
,
bench
"one origin state, 100 normal"
$
withInit
@
Powerset
(
enc
(
True
:
replicate
100
False
)
[
(
0
,
()
,
to
)
|
to
<-
[
1
..
100
]
])
(
return
()
)
(
\
()
->
collectTouchedBlocks
(
Block
1
))
]
...
...
@@ -81,7 +72,8 @@ benchCollectTouchedBlocks = bgroup
-- for each benchmark. Otherwise it takes ages to run the benchmarks.
withInit
::
forall
h
env
a
.
(
RefinementInterface
h
,
NFData
env
,
NFData
a
)
::
forall
h
env
a
.
(
RefinementInterface
h
,
NFData
env
,
NFData
a
)
=>
Encoding
(
Label
h
)
(
H1
h
)
->
SplitM
RealWorld
h
env
->
(
env
->
SplitM
RealWorld
h
a
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment