Skip to content

Commit cfa2b17

Browse files
committed
MAINT: do not try SIMD arithmetic loops if count < 4
1 parent 154c293 commit cfa2b17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ NPY_NO_EXPORT void NPY_CPU_DISPATCH_CURFX(@TYPE@_@kind@)
537537
*((@type@ *)iop1) = io1;
538538
#endif
539539
}
540-
else if (!run_binary_simd_@kind@_@TYPE@(args, dimensions, steps)) {
540+
else if (dimensions[0] < 4 || !run_binary_simd_@kind@_@TYPE@(args, dimensions, steps)) {
541541
BINARY_LOOP {
542542
const @type@ in1 = *(@type@ *)ip1;
543543
const @type@ in2 = *(@type@ *)ip2;

0 commit comments

Comments
 (0)