Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DualTVDD.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stephan Hilb
DualTVDD.jl
Commits
bc76b4ef
Commit
bc76b4ef
authored
4 years ago
by
Stephan Hilb
Browse files
Options
Downloads
Patches
Plain Diff
disable coloring for parallel version
parent
e9420a5b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/dualtvdd.jl
+6
-4
6 additions, 4 deletions
src/dualtvdd.jl
with
6 additions
and
4 deletions
src/dualtvdd.jl
+
6
−
4
View file @
bc76b4ef
...
@@ -68,10 +68,11 @@ function init(alg::DualTVDDAlgorithm{<:DualTVL1ROFOpProblem})
...
@@ -68,10 +68,11 @@ function init(alg::DualTVDDAlgorithm{<:DualTVL1ROFOpProblem})
# global dual variable
# global dual variable
p
=
zeros
(
p1type
(
eltype
(
g
)),
ax
)
p
=
zeros
(
p1type
(
eltype
(
g
)),
ax
)
# local dual variable
# local dual variable
subp
=
[
zeros
(
p1type
(
eltype
(
g
)),
sax
)
for
sax
in
subax
]
subp
=
[
zeros
(
p1type
(
eltype
(
g
)),
length
.
(
sax
)
)
for
sax
in
subax
]
# create subproblem contexts
# create subproblem contexts
cids
=
chessboard_coloring
(
size
(
subax
))
cids
=
alg
.
parallel
?
[
eachindex
(
subax
)]
:
chessboard_coloring
(
size
(
subax
))
cons
=
Array
{
Connector
,
d
}(
undef
,
size
(
subax
))
cons
=
Array
{
Connector
,
d
}(
undef
,
size
(
subax
))
for
(
color
,
sidxs
)
in
enumerate
(
cids
)
for
(
color
,
sidxs
)
in
enumerate
(
cids
)
for
(
i
,
sidx
)
in
enumerate
(
sidxs
)
for
(
i
,
sidx
)
in
enumerate
(
sidxs
)
...
@@ -117,7 +118,7 @@ function subworker(alg, subalg)
...
@@ -117,7 +118,7 @@ function subworker(alg, subalg)
subg
=
take!
(
con
)
subg
=
take!
(
con
)
subalg
.
problem
.
g
.=
subg
subalg
.
problem
.
g
.=
subg
# run algorithm
# run algorithm
for
_
in
1
:
1000
for
_
in
1
:
ninner
step!
(
subst
)
step!
(
subst
)
end
end
# write result
# write result
...
@@ -139,7 +140,8 @@ function step!(ctx::DualTVDDState)
...
@@ -139,7 +140,8 @@ function step!(ctx::DualTVDDState)
p_don
=
zeros
(
eltype
(
ctx
.
p
),
size
(
ctx
.
p
))
p_don
=
zeros
(
eltype
(
ctx
.
p
),
size
(
ctx
.
p
))
# subdomain loop (in coloring order)
# subdomain loop (in coloring order)
cids
=
chessboard_coloring
(
size
(
ctx
.
subax
))
cids
=
alg
.
parallel
?
[
eachindex
(
ctx
.
subax
)]
:
chessboard_coloring
(
size
(
ctx
.
subax
))
for
(
color
,
ids
)
in
enumerate
(
cids
)
for
(
color
,
ids
)
in
enumerate
(
cids
)
for
i
in
ids
for
i
in
ids
sax
=
ctx
.
subax
[
i
]
sax
=
ctx
.
subax
[
i
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment