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
ff867921
Commit
ff867921
authored
Dec 11, 2018
by
Michaël Roynard
Browse files
Revert useless disambiguation for now non-ambiguous calls
parent
19bb29f9
Pipeline
#12477
passed with stages
in 12 minutes and 46 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bench/BMErosion.cpp
View file @
ff867921
...
...
@@ -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
(
mln
::
point2d
{
0
,
0
});
uint8
*
__restrict__
outptr
=
&
out
(
mln
::
point2d
{
0
,
0
});
const
uint8
*
__restrict__
inptr
=
&
f
({
0
,
0
});
uint8
*
__restrict__
outptr
=
&
out
({
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
(
mln
::
point2d
{
0
,
0
});
uint8
*
__restrict__
outptr
=
&
out
(
mln
::
point2d
{
0
,
0
});
const
uint8
*
__restrict__
inptr
=
&
f
({
0
,
0
});
uint8
*
__restrict__
outptr
=
&
out
({
0
,
0
});
ptrdiff_t
offsets
[
sz
];
wrt_offset
(
f
,
dpoints
,
offsets
);
...
...
bench/BMMorphers.cpp
View file @
ff867921
...
...
@@ -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
(
point2d
{
0
,
0
});
const
char
*
ptr_in
=
(
const
char
*
)
&
f
({
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
(
point2d
{
0
,
0
});
const
char
*
ptr_in
=
(
const
char
*
)
&
f
({
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
(
point2d
{
0
,
0
});
char
*
ptr_out
=
(
char
*
)
&
out
(
point2d
{
0
,
0
});
const
char
*
ptr_in
=
(
const
char
*
)
&
f
({
0
,
0
});
char
*
ptr_out
=
(
char
*
)
&
out
({
0
,
0
});
int
istride
=
(
int
)(
f
.
strides
()[
0
]
-
nc
*
sizeof
(
T
));
for
(
int
i
=
0
;
i
<
nr
;
++
i
)
...
...
bench/BMNeighborhood.cpp
View file @
ff867921
...
...
@@ -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
[
image2d
<
int
>::
size_type
(
p
+
offset
)
];
sum
+=
ima
[
p
+
offset
];
u
+=
sum
;
}
idx
+=
static_cast
<
int
>
(
ima
.
index_strides
()[
0
]);
...
...
bench/BMRotation.cpp
View file @
ff867921
...
...
@@ -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
(
point2d
{
0
,
0
});
const
T
*
ptr_in
=
&
f
({
0
,
0
});
for
(
int
i
=
0
;
i
<
nr
;
++
i
)
{
T
*
ptr_out
=
&
out
(
point2d
{
0
,
(
short
)
i
});
T
*
ptr_out
=
&
out
({
0
,
(
short
)
i
});
for
(
int
j
=
0
;
j
<
nc
;
++
j
)
{
*
ptr_out
=
ptr_in
[
j
];
...
...
pylene/include/mln/core/image/sub_image.spe.hpp
View file @
ff867921
...
...
@@ -39,7 +39,7 @@ namespace mln
other
.
m_domain
=
domain
;
other
.
m_border
=
image
.
m_border
;
// FIXME
other
.
m_ptr
=
(
char
*
)
&
image
(
domain
.
pmin
);
other
.
m_last
=
(
char
*
)
&
image
(
typename
Domain_
::
point_type
(
domain
.
pmax
-
1
)
)
;
other
.
m_last
=
(
char
*
)
&
image
(
domain
.
pmax
-
1
);
other
.
m_ptr_origin
=
image
.
m_ptr_origin
;
other
.
m_index_first
=
image
.
index_of_point
(
domain
.
pmin
);
other
.
m_index_last
=
image
.
index_of_point
(
domain
.
pmax
-
1
);
...
...
pylene/include/mln/graphcut/graphcut.hh
View file @
ff867921
...
...
@@ -389,15 +389,9 @@ namespace mln
Etype
&
edge_at
(
const
edge_type
&
e
)
{
if
(
e
.
type
==
SOURCE_EDGE
)
{
point2d
pnt
=
e
.
p
/
2
;
return
m_src
.
at
(
pnt
);
}
return
m_src
.
at
(
e
.
p
/
2
);
else
if
(
e
.
type
==
SINK_EDGE
)
{
point2d
pnt
=
e
.
p
/
2
;
return
m_sink
.
at
(
pnt
);
}
return
m_sink
.
at
(
e
.
p
/
2
);
else
return
base
::
edge_at
(
e
.
p
);
}
...
...
@@ -616,9 +610,8 @@ namespace mln
{
case
G
::
SOURCE_EDGE
:
{
typename
image2d
<
V
>::
site_type
pnt
=
graph
.
target
(
e
)
/
2
;
w
=
d
(
false
,
ima
(
pnt
));
graph
.
edge
(
e
)
=
{
w
,
0
};
w
=
d
(
false
,
ima
(
graph
.
target
(
e
)
/
2
));
graph
.
edge
(
e
)
=
{
w
,
0
};
break
;
}
case
G
::
NORMAL_EDGE
:
...
...
@@ -628,9 +621,8 @@ namespace mln
}
case
G
::
SINK_EDGE
:
{
typename
image2d
<
V
>::
site_type
pnt
=
graph
.
source
(
e
)
/
2
;
w
=
d
(
true
,
ima
(
pnt
));
graph
.
edge
(
e
)
=
{
w
,
0
};
w
=
d
(
true
,
ima
(
graph
.
source
(
e
)
/
2
));
graph
.
edge
(
e
)
=
{
w
,
0
};
break
;
}
}
...
...
pylene/include/mln/morpho/tos/private/immersion.hpp
View file @
ff867921
...
...
@@ -59,9 +59,9 @@ namespace mln
std
::
enable_if_t
<
dim
==
(
O
::
ndim
-
1
)
>
immersion
(
const
I
&
input
,
O
&
output
,
mln_point
(
I
)
pmin
,
mln_point
(
I
)
pmax
)
{
mln_point
(
I
)
q
=
pmin
/
2
;
auto
p
=
pmin
;
auto
a
=
input
(
q
);
auto
q
=
pmin
/
2
;
auto
p
=
pmin
;
auto
a
=
input
(
q
);
output
(
p
)
=
a
;
for
(
int
i
=
pmin
[
dim
]
+
2
;
i
<
pmax
[
dim
];
i
+=
2
)
...
...
tests/morpho/dilate.cpp
View file @
ff867921
...
...
@@ -31,7 +31,7 @@ void test_dilation_by_periodic_line(const mln::point2d& dp, int k)
for
(
int
i
=
0
;
i
<
k
;
++
i
)
mln_foreach
(
auto
p
,
ref
.
domain
())
if
(
ref
.
domain
().
has
(
p
+
dp
))
ref
(
p
)
=
ref
(
mln
::
point2d
(
p
+
dp
)
)
;
ref
(
p
)
=
ref
(
p
+
dp
);
// Run algo
mln
::
se
::
periodic_line2d
line
(
dp
,
k
);
...
...
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