Skip to content

Commit

Permalink
Remove compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Algy committed Aug 29, 2019
1 parent 26766af commit 37aa36d
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 11 deletions.
2 changes: 0 additions & 2 deletions arch/arm/neon.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions arch/x64/avx2.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 0 additions & 4 deletions cca.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,6 @@ namespace cca {
// auto t1 = Clock::now();
std::unique_ptr<ComponentSet> 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<label_no_t> substitute(num_components, 0xFFFF);
std::vector<component_no_t> comps;
Expand Down
2 changes: 2 additions & 0 deletions cielab.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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
3 changes: 2 additions & 1 deletion context.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,13 @@ namespace fslic {
protected:
int16_t subsample_rem;
int16_t subsample_stride;
PreemptiveGrid preemptive_grid;
protected:
simd_helper::AlignedArray<uint8_t> quad_image;
simd_helper::AlignedArray<uint16_t> assignment;
simd_helper::AlignedArray<DistType> min_dists;
simd_helper::AlignedArray<DistType> 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)),
Expand Down
2 changes: 0 additions & 2 deletions simd-helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 37aa36d

Please sign in to comment.