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
b8d4a3c2
Commit
b8d4a3c2
authored
Apr 04, 2019
by
Hans-Peter Deifel
Browse files
Print partition size while refining
parent
1f8b6e79
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/Copar/Algorithm/Split.hs
View file @
b8d4a3c2
...
...
@@ -24,7 +24,7 @@ import Control.Monad.ST
import
Control.Monad.ST.Unsafe
(
unsafeSTToIO
)
import
Data.Maybe
(
maybeToList
)
import
Data.STRef
import
System.IO.Unsafe
(
unsafeDupablePerformIO
)
import
System.IO.Unsafe
(
unsafeDupablePerformIO
,
unsafePerformIO
)
import
Data.Ord
(
comparing
)
import
Control.Monad.Extra
(
unlessM
,
whenM
)
...
...
@@ -45,11 +45,17 @@ import Copar.RefinementInterface (RefinementInterface, F3)
import
qualified
Copar.RefinementInterface
as
RI
import
Copar.Algorithm.Types
import
Debug.Trace
import
System.CPUTime
type
SplitM
s
f
=
ReaderT
(
AlgoState
s
f
,
BlockQueue
s
)
(
ST
s
)
split
::
RefinementInterface
f
=>
Block
->
SplitM
s
f
()
split
blockS
=
do
(
as
,
_
)
<-
ask
let
!
time
=
unsafePerformIO
getCPUTime
size
<-
lift
(
Partition
.
numBlocks
(
partition
as
))
traceM
$
show
time
<>
" "
<>
show
size
touchedBlocks
<-
collectTouchedBlocks
blockS
forM_
touchedBlocks
$
\
(
b
,
v0
)
->
do
...
...
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