Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
codes
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
38
Issues
38
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
codes
codes
Commits
7f0c5265
Commit
7f0c5265
authored
Jun 05, 2018
by
Neil McGlohon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dfp: revert minimal to choose best on local
parent
32527fe2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
src/networks/model-net/dragonfly-plus.C
src/networks/model-net/dragonfly-plus.C
+12
-12
No files found.
src/networks/model-net/dragonfly-plus.C
View file @
7f0c5265
...
@@ -3017,18 +3017,18 @@ static Connection do_dfp_routing(router_state *s,
...
@@ -3017,18 +3017,18 @@ static Connection do_dfp_routing(router_state *s,
if
(
poss_next_stops
.
size
()
<
1
)
if
(
poss_next_stops
.
size
()
<
1
)
tw_error
(
TW_LOC
,
"MINIMAL DEAD END
\n
"
);
tw_error
(
TW_LOC
,
"MINIMAL DEAD END
\n
"
);
int
rand_sel
=
tw_rand_integer
(
lp
->
rng
,
0
,
poss_next_stops
.
size
()
-
1
);
//
int rand_sel = tw_rand_integer(lp->rng, 0, poss_next_stops.size() -1 );
return
poss_next_stops
[
rand_sel
];
//
return poss_next_stops[rand_sel];
//
ConnectionType conn_type = poss_next_stops[0].conn_type;
ConnectionType
conn_type
=
poss_next_stops
[
0
].
conn_type
;
//
Connection best_min_conn;
Connection
best_min_conn
;
//
if (conn_type == CONN_GLOBAL) {
if
(
conn_type
==
CONN_GLOBAL
)
{
//
int rand_sel = tw_rand_integer(lp->rng, 0, poss_next_stops.size() -1);
int
rand_sel
=
tw_rand_integer
(
lp
->
rng
,
0
,
poss_next_stops
.
size
()
-
1
);
//
return poss_next_stops[rand_sel];
return
poss_next_stops
[
rand_sel
];
//
}
}
//
else
else
//
best_min_conn = get_absolute_best_connection_from_conns(s, bf, msg, lp, poss_next_stops); //gets absolute best
best_min_conn
=
get_absolute_best_connection_from_conns
(
s
,
bf
,
msg
,
lp
,
poss_next_stops
);
//gets absolute best
//
return best_min_conn;
return
best_min_conn
;
}
}
else
{
//routing algorithm is specified in routing
else
{
//routing algorithm is specified in routing
...
...
Write
Preview
Markdown
is supported
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