Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cmp_tool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dominik Loidolt
cmp_tool
Commits
fc454577
Commit
fc454577
authored
3 years ago
by
Dominik Loidolt
Browse files
Options
Downloads
Patches
Plain Diff
add code feedback from Armin
parent
3ef67b3d
No related branches found
No related tags found
1 merge request
!2
added feature to guess the compression configuration
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/cmp_guess.c
+5
-5
5 additions, 5 deletions
lib/cmp_guess.c
lib/cmp_support.c
+2
-2
2 additions, 2 deletions
lib/cmp_support.c
lib/cmp_tool_lib.c
+1
-1
1 addition, 1 deletion
lib/cmp_tool_lib.c
with
8 additions
and
8 deletions
lib/cmp_guess.c
+
5
−
5
View file @
fc454577
...
...
@@ -62,8 +62,8 @@ uint16_t cmp_guess_model_value(int n_model_updates)
return
11
;
if
(
n_model_updates
<=
21
)
return
12
;
else
return
13
;
return
13
;
}
...
...
@@ -84,7 +84,7 @@ static uint32_t pre_cal_method(struct cmp_cfg *cfg)
uint32_t
golomb_par_best
=
0
;
uint32_t
spill_best
=
0
;
for
(
g
=
MIN_RDCU_GOLOMB_PAR
;
g
<
MAX_RDCU_GOLOMB_PAR
;
++
g
)
{
for
(
g
=
MIN_RDCU_GOLOMB_PAR
;
g
<
MAX_RDCU_GOLOMB_PAR
;
g
++
)
{
uint32_t
s
=
cmp_get_good_spill
(
g
,
cfg
->
cmp_mode
);
cfg
->
golomb_par
=
g
;
...
...
@@ -133,8 +133,8 @@ static uint32_t brute_force(struct cmp_cfg *cfg)
printf
(
"0%%... "
);
fflush
(
stdout
);
for
(
g
=
MIN_RDCU_GOLOMB_PAR
;
g
<
MAX_RDCU_GOLOMB_PAR
;
++
g
)
{
for
(
s
=
MIN_RDCU_SPILL
;
s
<
get_max_spill
(
g
,
cfg
->
cmp_mode
);
++
s
)
{
for
(
g
=
MIN_RDCU_GOLOMB_PAR
;
g
<
MAX_RDCU_GOLOMB_PAR
;
g
++
)
{
for
(
s
=
MIN_RDCU_SPILL
;
s
<
get_max_spill
(
g
,
cfg
->
cmp_mode
);
s
++
)
{
cfg
->
golomb_par
=
g
;
cfg
->
spill
=
s
;
...
...
This diff is collapsed.
Click to expand it.
lib/cmp_support.c
+
2
−
2
View file @
fc454577
...
...
@@ -426,9 +426,9 @@ uint32_t get_max_spill(unsigned int golomb_par, unsigned int cmp_mode)
return
LUT_MAX_RDCU
[
golomb_par
];
}
else
{
if
(
golomb_par
>
MAX_ICU_GOLOMB_PAR
)
if
(
golomb_par
>
MAX_ICU_GOLOMB_PAR
)
{
return
0
;
else
{
}
else
{
/* the ICU compressor can generate code words with a length of
* maximal 32 bits. */
unsigned
int
max_cw_bits
=
32
;
...
...
This diff is collapsed.
Click to expand it.
lib/cmp_tool_lib.c
+
1
−
1
View file @
fc454577
...
...
@@ -250,7 +250,7 @@ static void remove_spaces(char *s)
do
{
while
(
*
d
==
' '
||
*
d
==
'\t'
)
++
d
;
d
++
;
}
while
((
*
s
++
=
*
d
++
)
!=
'\0'
);
}
...
...
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