Skip to content

Commit 12960e8

Browse files
Add vector casts to resolve additional cygwin failures
1 parent ed41836 commit 12960e8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

numpy/core/src/umath/loops_unary_fp.dispatch.c.src

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ npyv_isinf_@sfx@(npyv_@sfx@ v)
118118
#else
119119
// fabs via masking of sign bit
120120
const npyv_@sfx@ signmask = npyv_setall_@sfx@(-0.@fd@);
121-
npyv_@sfx@ r = npyv_reinterpret_@sfx@_u8(npyv_andc_u8(v, signmask));
122-
r = npyv_cmpgt_@sfx@(r, fltmax);
121+
npyv_u8 r_u8 = npyv_andc_u8(npyv_reinterpret_u8_@sfx@(v), npyv_reinterpret_u8_@sfx@(signmask));
122+
npyv_u@ssfx@ r = npyv_cmpgt_@sfx@(npyv_reinterpret_@sfx@_u8(r_u8), fltmax);
123123
#endif
124124
return npyv_shri_u@ssfx@(r, (sizeof(npyv_lanetype_@sfx@)*8)-1);
125125
}
@@ -134,8 +134,8 @@ npyv_isfinite_@sfx@(npyv_@sfx@ v)
134134
#else
135135
// fabs via masking of sign bit
136136
const npyv_@sfx@ signmask = npyv_setall_@sfx@(-0.@fd@);
137-
npyv_@sfx@ r = npyv_reinterpret_@sfx@_u8(npyv_andc_u8(v, signmask));
138-
r = npyv_cmple_@sfx@(r, fltmax);
137+
npyv_u8 r_u8 = npyv_andc_u8(npyv_reinterpret_u8_@sfx@(v), npyv_reinterpret_u8_@sfx@(signmask));
138+
npyv_u@ssfx@ r = npyv_cmple_@sfx@(npyv_reinterpret_@sfx@_u8(r_u8), fltmax);
139139
#endif
140140
return npyv_shri_u@ssfx@(r, (sizeof(npyv_lanetype_@sfx@)*8)-1);
141141
}

0 commit comments

Comments
 (0)