Commit a3fceea5 authored by Robert Kimball's avatar Robert Kimball Committed by Scott Cyphers

Update to support building with clang 6.0 (#3167)

parent f4b487a4
...@@ -37,20 +37,13 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") ...@@ -37,20 +37,13 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
add_compile_options(-Wno-zero-as-null-pointer-constant) add_compile_options(-Wno-zero-as-null-pointer-constant)
endif() endif()
endif() endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.0.0")
add_compile_options(-Wno-unused-lambda-capture)
endif()
endif()
# should remove these # should remove these
# add_compile_options(-Wno-old-style-cast)
add_compile_options(-Wno-float-conversion) add_compile_options(-Wno-float-conversion)
add_compile_options(-Wno-sign-conversion) add_compile_options(-Wno-sign-conversion)
add_compile_options(-Wno-padded) add_compile_options(-Wno-padded)
add_compile_options(-Wno-sign-compare) add_compile_options(-Wno-sign-compare)
add_compile_options(-Wno-unused-parameter) add_compile_options(-Wno-unused-parameter)
add_compile_options(-Wno-conversion) add_compile_options(-Wno-conversion)
add_compile_options(-Wno-double-promotion) add_compile_options(-Wno-double-promotion)
add_compile_options(-Wno-undefined-func-template) add_compile_options(-Wno-undefined-func-template)
...@@ -52,7 +52,7 @@ void ngraph::set_distributed_interface(std::unique_ptr<DistributedInterface> dis ...@@ -52,7 +52,7 @@ void ngraph::set_distributed_interface(std::unique_ptr<DistributedInterface> dis
DistributedInterface* ngraph::get_distributed_interface() DistributedInterface* ngraph::get_distributed_interface()
{ {
if (0 == s_distributed_interface) if (nullptr == s_distributed_interface)
{ {
#ifdef NGRAPH_DISTRIBUTED_OMPI_ENABLE #ifdef NGRAPH_DISTRIBUTED_OMPI_ENABLE
set_distributed_interface(std::unique_ptr<DistributedInterface>( set_distributed_interface(std::unique_ptr<DistributedInterface>(
......
...@@ -77,7 +77,7 @@ protected: ...@@ -77,7 +77,7 @@ protected:
private: private:
PassPropertyMask m_property; PassPropertyMask m_property;
ManagerState* m_state{0}; ManagerState* m_state{nullptr};
}; };
class ngraph::pass::ModulePass : public PassBase class ngraph::pass::ModulePass : public PassBase
......
...@@ -70,7 +70,6 @@ namespace ngraph ...@@ -70,7 +70,6 @@ namespace ngraph
auto& deps = mkldnn_emitter->get_primitive_deps(conv_index); auto& deps = mkldnn_emitter->get_primitive_deps(conv_index);
auto functor = [&, auto functor = [&,
scales_size,
conv_desc, conv_desc,
conv_attr, conv_attr,
deps, deps,
......
...@@ -173,7 +173,7 @@ void runtime::cpu::CPUTensorView::copy_from(const ngraph::runtime::Tensor& sourc ...@@ -173,7 +173,7 @@ void runtime::cpu::CPUTensorView::copy_from(const ngraph::runtime::Tensor& sourc
dynamic_cast<ngraph::runtime::cpu::LayoutDescriptor*>(this->get_tensor_layout().get()); dynamic_cast<ngraph::runtime::cpu::LayoutDescriptor*>(this->get_tensor_layout().get());
auto other_tl = auto other_tl =
dynamic_cast<ngraph::runtime::cpu::LayoutDescriptor*>(source.get_tensor_layout().get()); dynamic_cast<ngraph::runtime::cpu::LayoutDescriptor*>(source.get_tensor_layout().get());
if ((this_tl != NULL) && (other_tl != NULL) && (*this_tl == *other_tl)) if ((this_tl != nullptr) && (other_tl != nullptr) && (*this_tl == *other_tl))
{ {
// Direct copy // Direct copy
memcpy(get_data_ptr(), cpu_source->get_data_ptr(), get_size_in_bytes()); memcpy(get_data_ptr(), cpu_source->get_data_ptr(), get_size_in_bytes());
......
...@@ -32,7 +32,6 @@ TEST(event_tracing, event_file) ...@@ -32,7 +32,6 @@ TEST(event_tracing, event_file)
// Set the environment variable to ensure logging // Set the environment variable to ensure logging
ngraph::Event::enable_event_tracing(); ngraph::Event::enable_event_tracing();
std::vector<std::thread> threads; std::vector<std::thread> threads;
std::mutex mtx;
for (auto i = 0; i < 10; i++) for (auto i = 0; i < 10; i++)
{ {
int id = i; int id = i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment