Permalink
Browse files

Fix warnings with gcc 4.8.5 (#2320)

  • Loading branch information...
bertmaher committed Jan 30, 2019
1 parent c56372e commit 8b38c39fb3199cef497e542ab8bf9c9bfff3cde3
@@ -30,8 +30,13 @@ if(MSVC OR CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_RELEASE} /fp:fast")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:4194304")
else()
include(CheckCXXCompilerFlag)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wnon-virtual-dtor -fno-exceptions -fno-rtti")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -O0")
CHECK_CXX_COMPILER_FLAG("-Wno-psabi" HAS_W_NO_PSABI)
if(HAS_W_NO_PSABI)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-psabi")
endif()
if((CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64 OR CMAKE_SYSTEM_PROCESSOR STREQUAL armv7)
AND CMAKE_CXX_COMPILER_ID STREQUAL Clang)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ffast-math")
@@ -1546,7 +1546,7 @@ static void find_min_max_f(float *tensor, size_t size, float &min, float &max) {
}

static int check_all_zeros(float *arrayToCheck, size_t size) {
for (int i = 0; i < size; ++i) {
for (size_t i = 0; i < size; ++i) {
if (arrayToCheck[i] != 0) {
return 0;
}
@@ -56,7 +56,7 @@ constexpr int nc = 4096;
/// Only pack matrices if dimension is above this threshold. Packing is
/// primarily helpful for avoiding TLB pressure and cache set conflicts, so this
/// can be fairly large.
constexpr size_t pack_threshold = 1024;
constexpr int pack_threshold = 1024;

/// Compute a RAxRB block of C using a vectorized dot product, where RA is the
/// number of registers to load from matrix A, and RB is the number of registers

0 comments on commit 8b38c39

Please sign in to comment.