Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
codes
codes
Commits
b1c85a7c
Commit
b1c85a7c
authored
Aug 17, 2015
by
Jonathan Jenkins
Browse files
minor data structure changes from codes-base
parent
b15005f4
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/models/networks/model-net/dragonfly.c
View file @
b1c85a7c
...
...
@@ -330,7 +330,7 @@ static void dragonfly_configure(){
all_params
=
calloc
(
num_params
,
sizeof
(
*
all_params
));
for
(
uint64_t
i
=
0
;
i
<
anno_map
->
num_annos
;
i
++
){
const
char
*
anno
=
anno_map
->
annotations
[
i
];
const
char
*
anno
=
anno_map
->
annotations
[
i
]
.
ptr
;
dragonfly_read_config
(
anno
,
&
all_params
[
i
]);
}
if
(
anno_map
->
has_unanno_lp
>
0
){
...
...
src/models/networks/model-net/loggp.c
View file @
b1c85a7c
...
...
@@ -732,7 +732,7 @@ static void loggp_configure(){
all_params
=
malloc
(
num_params
*
sizeof
(
*
all_params
));
for
(
uint64_t
i
=
0
;
i
<
anno_map
->
num_annos
;
i
++
){
const
char
*
anno
=
anno_map
->
annotations
[
i
];
const
char
*
anno
=
anno_map
->
annotations
[
i
]
.
ptr
;
int
rc
=
configuration_get_value_relpath
(
&
config
,
"PARAMS"
,
"net_config_file"
,
anno
,
config_file
,
MAX_NAME_LENGTH
);
if
(
rc
<=
0
){
...
...
src/models/networks/model-net/model-net-lp.c
View file @
b1c85a7c
...
...
@@ -237,18 +237,18 @@ void model_net_base_configure(){
// first grab all of the annotations and store locally
for
(
int
c
=
0
;
c
<
lpconf
.
lpannos_count
;
c
++
){
const
config_anno_map_t
*
amap
=
&
lpconf
.
lpannos
[
c
];
if
(
strncmp
(
"modelnet_"
,
amap
->
lp_name
,
9
)
==
0
){
if
(
strncmp
(
"modelnet_"
,
amap
->
lp_name
.
ptr
,
9
)
==
0
){
for
(
int
n
=
0
;
n
<
amap
->
num_annos
;
n
++
){
int
a
;
for
(
a
=
0
;
a
<
num_params
;
a
++
){
if
(
annos
[
a
]
!=
NULL
&&
strcmp
(
amap
->
annotations
[
n
],
annos
[
a
])
==
0
){
if
(
annos
[
a
]
!=
NULL
&&
amap
->
annotations
[
n
].
ptr
!=
NULL
&&
strcmp
(
amap
->
annotations
[
n
]
.
ptr
,
annos
[
a
])
==
0
){
break
;
}
}
if
(
a
==
num_params
){
// found a new annotation
annos
[
num_params
++
]
=
amap
->
annotations
[
n
];
annos
[
num_params
++
]
=
amap
->
annotations
[
n
]
.
ptr
;
}
}
if
(
amap
->
has_unanno_lp
){
...
...
src/models/networks/model-net/model-net.c
View file @
b1c85a7c
...
...
@@ -61,7 +61,7 @@ void model_net_register(){
for
(
int
grp
=
0
;
grp
<
lpconf
.
lpgroups_count
;
grp
++
){
config_lpgroup_t
*
lpgroup
=
&
lpconf
.
lpgroups
[
grp
];
for
(
int
lpt
=
0
;
lpt
<
lpgroup
->
lptypes_count
;
lpt
++
){
char
*
nm
=
lpgroup
->
lptypes
[
lpt
].
name
;
char
const
*
nm
=
lpgroup
->
lptypes
[
lpt
].
name
.
ptr
;
for
(
int
n
=
0
;
n
<
MAX_NETS
;
n
++
){
if
(
!
do_config_nets
[
n
]
&&
strcmp
(
model_net_lp_config_names
[
n
],
nm
)
==
0
){
...
...
src/models/networks/model-net/simplenet-upd.c
View file @
b1c85a7c
...
...
@@ -585,7 +585,7 @@ static void sn_configure()
num_params
=
anno_map
->
num_annos
+
(
anno_map
->
has_unanno_lp
>
0
);
all_params
=
malloc
(
num_params
*
sizeof
(
*
all_params
));
for
(
uint64_t
i
=
0
;
i
<
anno_map
->
num_annos
;
i
++
){
const
char
*
anno
=
anno_map
->
annotations
[
i
];
const
char
*
anno
=
anno_map
->
annotations
[
i
]
.
ptr
;
int
rc
;
rc
=
configuration_get_value_double
(
&
config
,
"PARAMS"
,
"net_startup_ns"
,
anno
,
&
all_params
[
i
].
net_startup_ns
);
...
...
src/models/networks/model-net/simplep2p.c
View file @
b1c85a7c
...
...
@@ -910,7 +910,7 @@ static void sp_configure(){
num_params
=
anno_map
->
num_annos
+
(
anno_map
->
has_unanno_lp
>
0
);
all_params
=
malloc
(
num_params
*
sizeof
(
*
all_params
));
for
(
uint64_t
i
=
0
;
i
<
anno_map
->
num_annos
;
i
++
){
sp_read_config
(
anno_map
->
annotations
[
i
],
&
all_params
[
i
]);
sp_read_config
(
anno_map
->
annotations
[
i
]
.
ptr
,
&
all_params
[
i
]);
}
if
(
anno_map
->
has_unanno_lp
>
0
){
sp_read_config
(
NULL
,
&
all_params
[
anno_map
->
num_annos
]);
...
...
src/models/networks/model-net/torus.c
View file @
b1c85a7c
...
...
@@ -242,7 +242,7 @@ static void torus_configure(){
all_params
=
malloc
(
num_params
*
sizeof
(
*
all_params
));
for
(
uint64_t
i
=
0
;
i
<
anno_map
->
num_annos
;
i
++
){
const
char
*
anno
=
anno_map
->
annotations
[
i
];
const
char
*
anno
=
anno_map
->
annotations
[
i
]
.
ptr
;
torus_read_config
(
anno
,
&
all_params
[
i
]);
}
if
(
anno_map
->
has_unanno_lp
>
0
){
...
...
@@ -1374,7 +1374,7 @@ void model_net_torus_get_dims(
p
=
&
all_params
[
anno_map
->
num_annos
];
else
{
for
(
i
=
0
;
i
<
num_params
;
i
++
)
{
if
(
strcmp
(
anno
,
anno_map
->
annotations
[
i
])
==
0
)
{
if
(
strcmp
(
anno
,
anno_map
->
annotations
[
i
]
.
ptr
)
==
0
)
{
p
=
&
all_params
[
i
];
break
;
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment