From 37aa36d8c1e43ad9fd1bdac5d4399c4428a2933b Mon Sep 17 00:00:00 2001 From: Algy Date: Thu, 29 Aug 2019 12:37:37 +0900 Subject: [PATCH] Remove compiler warnings --- arch/arm/neon.h | 2 -- arch/x64/avx2.h | 2 -- cca.cpp | 4 ---- cielab.h | 2 ++ context.h | 3 ++- simd-helper.hpp | 2 -- 6 files changed, 4 insertions(+), 11 deletions(-) diff --git a/arch/arm/neon.h b/arch/arm/neon.h index 9f0001c..07880c5 100644 --- a/arch/arm/neon.h +++ b/arch/arm/neon.h @@ -103,8 +103,6 @@ namespace fslic { ); // (16 + 16)(batch size) / 4(rgba quad) = stride 8 - #pragma unroll(4) - #pragma GCC unroll(4) for (int j = 0; j < patch_width_multiple8; j += 8) { ASSIGNMENT_VALUE_GETTER_BODY vst1q_u16(min_dist_row, new_min_dist); diff --git a/arch/x64/avx2.h b/arch/x64/avx2.h index 759434b..4ad5e49 100644 --- a/arch/x64/avx2.h +++ b/arch/x64/avx2.h @@ -137,8 +137,6 @@ namespace fslic { ); \ // 32(batch size) / 4(rgba quad) = stride 8 - #pragma unroll(4) - #pragma GCC unroll(4) for (int j = 0; j < patch_width_multiple8; j += 8) { ASSIGNMENT_VALUE_GETTER_BODY _mm_storeu_si128((__m128i*)min_dist_row, new_min_dist__narrow); diff --git a/cca.cpp b/cca.cpp index 3d7070d..5a82e74 100644 --- a/cca.cpp +++ b/cca.cpp @@ -194,10 +194,6 @@ namespace cca { // auto t1 = Clock::now(); std::unique_ptr cc_set { disjoint_set.flatten() }; - - const int dy[4] {-1, 0, 1, 0}; - const int dx[4] {0, -1, 0, 1}; - int num_components = cc_set->num_components; std::vector substitute(num_components, 0xFFFF); std::vector comps; diff --git a/cielab.h b/cielab.h index e3c6659..9ab5dd0 100644 --- a/cielab.h +++ b/cielab.h @@ -362,6 +362,7 @@ static void rgb_to_cielab(const uint8_t* aligned_quad_image, uint8_t *out, int s } } +#if 0 static void rgb_to_cielab_orig(const uint8_t* aligned_quad_image, uint8_t *out, int size, bool parallel) { #pragma omp parallel for if(parallel) for (int s = 0; s < size; s += 4) { @@ -406,5 +407,6 @@ static void rgb_to_cielab_orig(const uint8_t* aligned_quad_image, uint8_t *out, out[s+2] = (uint8_t)cieb; } } +#endif #endif diff --git a/context.h b/context.h index 1f583c3..384c690 100644 --- a/context.h +++ b/context.h @@ -40,12 +40,13 @@ namespace fslic { protected: int16_t subsample_rem; int16_t subsample_stride; - PreemptiveGrid preemptive_grid; protected: simd_helper::AlignedArray quad_image; simd_helper::AlignedArray assignment; simd_helper::AlignedArray min_dists; simd_helper::AlignedArray spatial_dist_patch; + + PreemptiveGrid preemptive_grid; public: BaseContext(int H, int W, int K, const uint8_t* image, Cluster *clusters) : H(H), W(W), K(K), image(image), clusters(clusters), S(sqrt(H * W / K)), diff --git a/simd-helper.hpp b/simd-helper.hpp index 072e67d..a79f668 100644 --- a/simd-helper.hpp +++ b/simd-helper.hpp @@ -18,7 +18,6 @@ #ifdef __alignas_is_defined # define ALIGN(X) alignas(X) #else -# pragma message("C++11 alignas unsupported :( Falling back to compiler attributes") # ifdef __GNUG__ # define ALIGN(X) __attribute__ ((aligned(X))) # elif defined(_MSC_VER) @@ -31,7 +30,6 @@ #ifdef __alignof_is_defined # define ALIGNOF(X) alignof(x) #else -# pragma message("C++11 alignof unsupported :( Falling back to compiler attributes") # ifdef __GNUG__ # define ALIGNOF(X) __alignof__ (X) # elif defined(_MSC_VER)