Skip to content

Commit

Permalink
Remove some redundant ifs
Browse files Browse the repository at this point in the history
  • Loading branch information
iver56 committed Jul 29, 2024
1 parent 75db064 commit 1d6aba9
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions numpy_minmax/_minmax.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ static inline MinMaxResult reduce_result_from_mm256(__m256 min_vals, __m256 max_
}
return result;
}
#endif

#if IS_X86_64
MinMaxResult minmax_avx(const float *a, size_t length) {
MinMaxResult result = { .min_val = FLT_MAX, .max_val = -FLT_MAX };

Expand All @@ -99,9 +97,7 @@ MinMaxResult minmax_avx(const float *a, size_t length) {

return reduce_result_from_mm256(min_vals, max_vals, result);
}
#endif

#if IS_X86_64
static inline MinMaxResult reduce_result_from_mm512(__m512 min_vals, __m512 max_vals, MinMaxResult result) {
float temp_min[16], temp_max[16];
_mm512_storeu_ps(temp_min, min_vals);
Expand All @@ -112,9 +108,7 @@ static inline MinMaxResult reduce_result_from_mm512(__m512 min_vals, __m512 max_
}
return result;
}
#endif

#if IS_X86_64
MinMaxResult minmax_avx512(const float *a, size_t length) {
MinMaxResult result = { .min_val = FLT_MAX, .max_val = -FLT_MAX };

Expand Down

0 comments on commit 1d6aba9

Please sign in to comment.