Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Xin Wang
codes-dev
Commits
75ba7b7e
Commit
75ba7b7e
authored
Jul 28, 2015
by
Jonathan Jenkins
Browse files
add ordering flag to config to define "default" ordering semantics
parent
8dbcd527
Changes
2
Hide whitespace changes
Inline
Side-by-side
codes/configuration.h
View file @
75ba7b7e
...
...
@@ -39,6 +39,10 @@ typedef struct config_anno_map_s
// only explicit annotations tracked here - use a flag to indicate a
// non-annotated LP type
int
has_unanno_lp
;
// for configuration/mapping functions to be able to provide "default"
// (annotation-ignoring) lookup semantics, provide a flag to determine if
// the unannotated lp type is first
int
is_unanno_first
;
uint64_t
num_annos
;
// maintain the number of lps that have the particular annotation
uint64_t
num_anno_lps
[
CONFIGURATION_MAX_ANNOS
];
...
...
src/modelconfig/configuration.c
View file @
75ba7b7e
...
...
@@ -284,6 +284,8 @@ static void check_add_anno(
config_anno_map_t
*
map
){
if
(
anno
[
0
]
==
'\0'
){
map
->
has_unanno_lp
=
1
;
if
(
!
map
->
num_annos
)
map
->
is_unanno_first
=
1
;
}
else
{
uint64_t
a
=
0
;
...
...
@@ -322,6 +324,7 @@ static void check_add_lp_type_anno(
strcpy
(
map
->
lp_name
,
lp_name
);
map
->
num_annos
=
0
;
map
->
has_unanno_lp
=
0
;
map
->
is_unanno_first
=
0
;
memset
(
map
->
num_anno_lps
,
0
,
CONFIGURATION_MAX_ANNOS
*
sizeof
(
*
map
->
num_anno_lps
));
check_add_anno
(
anno
,
map
);
...
...
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