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
a4603199
Commit
a4603199
authored
Dec 18, 2018
by
Michaël Roynard
Browse files
Revert useless changes
parent
9ca8bb5d
Pipeline
#12455
passed with stages
in 14 minutes and 36 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
a4603199
...
...
@@ -67,19 +67,6 @@ distcheck-linux-clang-debug:
CXX
:
"
clang++"
CC
:
"
clang"
# distcheck-linux-gcc-asan:
# <<: *distcheck-linux-base
# variables:
# PYLENE_CONFIGURATION: "Asan"
# CXX: "g++"
# CC: "gcc"
#
# distcheck-linux-clang-asan:
# <<: *distcheck-linux-base
# variables:
# PYLENE_CONFIGURATION: "Asan"
# CXX: "clang++"
# CC: "clang"
#########
# Bench #
...
...
CMakeLists.txt
View file @
a4603199
...
...
@@ -46,10 +46,6 @@ if(USE_DISTCC)
endif
(
USE_DISTCC
)
# include("cmake/FindAsan.cmake")
# set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address -fsanitize=leak")
# set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address -fsanitize=leak")
# CONFIGURATION OPTIONS
option
(
PYLENE_BUILD_BENCHMARKS
"Require Google Benchmark library. Set to YES to enable the compilation of benchmarks."
YES
)
...
...
cmake/FindAsan.cmake
deleted
100644 → 0
View file @
9ca8bb5d
#
# The MIT License (MIT)
#
# Copyright (c) 2013 Matthew Arsenault
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
# This module tests if address sanitizer is supported by the compiler,
# and creates a ASan build type (i.e. set CMAKE_BUILD_TYPE=ASan to use
# it). This sets the following variables:
#
# CMAKE_C_FLAGS_ASAN - Flags to use for C with asan
# CMAKE_CXX_FLAGS_ASAN - Flags to use for C++ with asan
# HAVE_ADDRESS_SANITIZER - True or false if the ASan build type is available
include
(
CheckCCompilerFlag
)
# Set -Werror to catch "argument unused during compilation" warnings
set
(
CMAKE_REQUIRED_FLAGS
"-Werror -faddress-sanitizer"
)
# Also needs to be a link flag for test to pass
check_c_compiler_flag
(
"-faddress-sanitizer"
HAVE_FLAG_ADDRESS_SANITIZER
)
set
(
CMAKE_REQUIRED_FLAGS
"-Werror -fsanitize=address"
)
# Also needs to be a link flag for test to pass
check_c_compiler_flag
(
"-fsanitize=address"
HAVE_FLAG_SANITIZE_ADDRESS
)
unset
(
CMAKE_REQUIRED_FLAGS
)
if
(
HAVE_FLAG_SANITIZE_ADDRESS
)
# Clang 3.2+ use this version
set
(
ADDRESS_SANITIZER_FLAG
"-fsanitize=address"
)
elseif
(
HAVE_FLAG_ADDRESS_SANITIZER
)
# Older deprecated flag for ASan
set
(
ADDRESS_SANITIZER_FLAG
"-faddress-sanitizer"
)
endif
()
if
(
NOT ADDRESS_SANITIZER_FLAG
)
return
()
else
(
NOT ADDRESS_SANITIZER_FLAG
)
set
(
HAVE_ADDRESS_SANITIZER FALSE
)
endif
()
set
(
HAVE_ADDRESS_SANITIZER TRUE
)
set
(
CMAKE_C_FLAGS_ASAN
"-O1 -g
${
ADDRESS_SANITIZER_FLAG
}
-fno-omit-frame-pointer -fno-optimize-sibling-calls"
CACHE STRING
"Flags used by the C compiler during ASan builds."
FORCE
)
set
(
CMAKE_CXX_FLAGS_ASAN
"-O1 -g
${
ADDRESS_SANITIZER_FLAG
}
-fno-omit-frame-pointer -fno-optimize-sibling-calls"
CACHE STRING
"Flags used by the C++ compiler during ASan builds."
FORCE
)
set
(
CMAKE_EXE_LINKER_FLAGS_ASAN
"
${
ADDRESS_SANITIZER_FLAG
}
"
CACHE STRING
"Flags used for linking binaries during ASan builds."
FORCE
)
set
(
CMAKE_SHARED_LINKER_FLAGS_ASAN
"
${
ADDRESS_SANITIZER_FLAG
}
"
CACHE STRING
"Flags used by the shared libraries linker during ASan builds."
FORCE
)
mark_as_advanced
(
CMAKE_C_FLAGS_ASAN
CMAKE_CXX_FLAGS_ASAN
CMAKE_EXE_LINKER_FLAGS_ASAN
CMAKE_SHARED_LINKER_FLAGS_ASAN
)
\ No newline at end of file
pylene/include/mln/core/image/internal/initializer.hpp
View file @
a4603199
...
...
@@ -29,21 +29,12 @@ namespace mln
{
};
template
<
typename
I
>
struct
New_Image
;
template
<
typename
V
,
class
I
>
internal
::
initializer
<
mln_ch_value
(
I
,
V
),
I
>
imchvalue
(
const
Image
<
I
>&
ref
);
template
<
typename
V
,
class
I
>
internal
::
initializer
<
mln_ch_value
(
I
,
V
),
I
>
imchvalue_new
(
const
New_Image
<
I
>&
ref
);
template
<
class
I
>
internal
::
initializer
<
mln_concrete
(
I
),
I
>
imconcretize
(
const
Image
<
I
>&
ref
);
template
<
class
I
>
internal
::
initializer
<
mln_concrete
(
I
),
I
>
imconcretize_new
(
const
New_Image
<
I
>&
ref
);
/******************************************/
/**** Implementation ****/
/******************************************/
...
...
@@ -234,13 +225,6 @@ namespace mln
return
internal
::
initializer
<
mln_ch_value
(
I
,
V
),
I
>
(
ref
);
}
template
<
typename
V
,
class
I
>
internal
::
initializer
<
mln_ch_value
(
I
,
V
),
I
>
imchvalue_new
(
const
New_Image
<
I
>&
_ref
)
{
const
I
&
ref
=
*
static_cast
<
const
I
*>
(
&
_ref
);
return
internal
::
initializer
<
mln_ch_value
(
I
,
V
),
I
>
(
ref
);
}
template
<
class
I
>
internal
::
initializer
<
mln_concrete
(
I
),
I
>
imconcretize
(
const
Image
<
I
>&
_ref
)
{
...
...
@@ -248,13 +232,6 @@ namespace mln
return
internal
::
initializer
<
mln_concrete
(
I
),
I
>
(
ref
);
}
template
<
class
I
>
internal
::
initializer
<
mln_concrete
(
I
),
I
>
imconcretize_new
(
const
New_Image
<
I
>&
_ref
)
{
const
I
&
ref
=
*
static_cast
<
const
I
*>
(
&
_ref
);
return
internal
::
initializer
<
mln_concrete
(
I
),
I
>
(
ref
);
}
}
// end of namespace mln
#endif //! MLN_CORE_IMAGE_INTERNAL_INITIALIZER_HPP
tests/core/image/image_ops.cpp
View file @
a4603199
...
...
@@ -111,8 +111,6 @@ TEST(Core, UnaryOperator)
image2d
<
int
>
ima
=
{{
1
,
2
,
3
},
{
4
,
5
,
6
}};
image2d
<
int
>
ref
=
{{
-
1
,
-
2
,
-
3
},
{
-
4
,
-
5
,
-
6
}};
// FIXME?: ?segfault?
auto
g
=
new_unary_minus
(
ima
);
ASSERT_TRUE
(
new_all
(
new_eq
(
g
,
ref
)));
}
...
...
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