Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Olena
pylene
Commits
8ef2a2ba
Commit
8ef2a2ba
authored
Dec 10, 2018
by
Michaël Roynard
Browse files
Fix benchmarks
parent
9519650b
Pipeline
#12383
passed with stages
in 14 minutes and 37 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bench/BMErosion.cpp
View file @
8ef2a2ba
...
...
@@ -36,8 +36,8 @@ void erode_c8_cstyle(const mln::image2d<mln::uint8>& f, mln::image2d<mln::uint8>
constexpr
int
sz
=
9
;
auto
dpoints
=
winc8_t
::
dpoints
;
const
uint8
*
__restrict__
inptr
=
&
f
({
0
,
0
});
uint8
*
__restrict__
outptr
=
&
out
({
0
,
0
});
const
uint8
*
__restrict__
inptr
=
&
f
(
mln
::
point2d
{
0
,
0
});
uint8
*
__restrict__
outptr
=
&
out
(
mln
::
point2d
{
0
,
0
});
ptrdiff_t
offsets
[
sz
];
wrt_offset
(
f
,
dpoints
,
offsets
);
...
...
@@ -65,8 +65,8 @@ void erode_c8_cstyle_restrict(const mln::image2d<mln::uint8>& f, mln::image2d<ml
constexpr
int
sz
=
9
;
auto
dpoints
=
winc8_t
::
dpoints
;
const
uint8
*
__restrict__
inptr
=
&
f
({
0
,
0
});
uint8
*
__restrict__
outptr
=
&
out
({
0
,
0
});
const
uint8
*
__restrict__
inptr
=
&
f
(
mln
::
point2d
{
0
,
0
});
uint8
*
__restrict__
outptr
=
&
out
(
mln
::
point2d
{
0
,
0
});
ptrdiff_t
offsets
[
sz
];
wrt_offset
(
f
,
dpoints
,
offsets
);
...
...
bench/BMMorphers.cpp
View file @
8ef2a2ba
...
...
@@ -13,7 +13,7 @@ unsigned threshold1(const image2d<uint8>& f, uint8 v)
int
nr
=
f
.
nrows
();
int
nc
=
f
.
ncols
();
const
char
*
ptr_in
=
(
const
char
*
)
&
f
({
0
,
0
});
const
char
*
ptr_in
=
(
const
char
*
)
&
f
(
point2d
{
0
,
0
});
unsigned
count
=
0
;
int
istride
=
(
int
)(
f
.
strides
()[
0
]
-
nc
*
sizeof
(
T
));
...
...
@@ -35,7 +35,7 @@ unsigned threshold1_bis(const image2d<uint8>& f, uint8 v)
int
nr
=
f
.
nrows
();
int
nc
=
f
.
ncols
();
const
char
*
ptr_in
=
(
const
char
*
)
&
f
({
0
,
0
});
const
char
*
ptr_in
=
(
const
char
*
)
&
f
(
point2d
{
0
,
0
});
unsigned
count
=
0
;
int
istride
=
(
int
)(
f
.
strides
()[
0
]
-
nc
*
sizeof
(
T
));
...
...
@@ -89,8 +89,8 @@ void threshold5(const image2d<uint8>& f, image2d<bool>& out, uint8 v)
int
nr
=
f
.
nrows
();
int
nc
=
f
.
ncols
();
const
char
*
ptr_in
=
(
const
char
*
)
&
f
({
0
,
0
});
char
*
ptr_out
=
(
char
*
)
&
out
({
0
,
0
});
const
char
*
ptr_in
=
(
const
char
*
)
&
f
(
point2d
{
0
,
0
});
char
*
ptr_out
=
(
char
*
)
&
out
(
point2d
{
0
,
0
});
int
istride
=
(
int
)(
f
.
strides
()[
0
]
-
nc
*
sizeof
(
T
));
for
(
int
i
=
0
;
i
<
nr
;
++
i
)
...
...
bench/BMNeighborhood.cpp
View file @
8ef2a2ba
...
...
@@ -72,7 +72,7 @@ long bench_indexes(const image2d<int>& ima)
int
p
=
idx
+
j
;
// * ima.index_strides()[1];
int
sum
=
0
;
for
(
int
offset
:
offsets
)
sum
+=
ima
[
p
+
offset
];
sum
+=
ima
[
image2d
<
int
>::
size_type
(
p
+
offset
)
];
u
+=
sum
;
}
idx
+=
static_cast
<
int
>
(
ima
.
index_strides
()[
0
]);
...
...
bench/BMRotation.cpp
View file @
8ef2a2ba
...
...
@@ -39,11 +39,11 @@ __attribute__((noinline)) void rotate_ptr(const image2d<T>& f, image2d<T>& out)
int
nc
=
f
.
ncols
();
int
istride
=
static_cast
<
int
>
(
f
.
strides
()[
0
]);
int
ostride
=
static_cast
<
int
>
(
out
.
strides
()[
0
]);
const
T
*
ptr_in
=
&
f
({
0
,
0
});
const
T
*
ptr_in
=
&
f
(
point2d
{
0
,
0
});
for
(
int
i
=
0
;
i
<
nr
;
++
i
)
{
T
*
ptr_out
=
&
out
({
0
,
(
short
)
i
});
T
*
ptr_out
=
&
out
(
point2d
{
0
,
(
short
)
i
});
for
(
int
j
=
0
;
j
<
nc
;
++
j
)
{
*
ptr_out
=
ptr_in
[
j
];
...
...
Write
Preview
Supports
Markdown
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