@@ -6,7 +6,7 @@ import ..NodeModule:
6
6
AbstractExpressionNode, constructorof, get_children, get_child, with_type_parameters
7
7
import .. StringsModule: string_tree
8
8
import .. OperatorEnumModule: AbstractOperatorEnum, OperatorEnum, GenericOperatorEnum
9
- import .. UtilsModule: fill_similar, counttuple, ResultOk
9
+ import .. UtilsModule: fill_similar, counttuple, ResultOk, @finite
10
10
import .. NodeUtilsModule: is_constant
11
11
import .. ExtensionInterfaceModule: bumper_eval_tree_array, _is_loopvectorization_loaded
12
12
import .. ValueInterfaceModule: is_valid, is_valid_array
295
295
# Fast general implementation of `cumulators[1] .= op.(cumulators[1], cumulators[2], ...)`
296
296
quote
297
297
Base. Cartesian. @nexprs ($ N, i -> cumulator_i = cumulators[i])
298
- @inbounds @simd for j in eachindex (cumulator_1)
298
+ @finite @ inbounds @simd for j in eachindex (cumulator_1)
299
299
cumulator_1[j] = Base. Cartesian. @ncall ($ N, op, i -> cumulator_i[j]):: T
300
300
end # COV_EXCL_LINE
301
301
return ResultOk (cumulator_1, true )
@@ -581,7 +581,7 @@ function deg1_l2_ll0_lr0_eval(
581
581
@return_on_nonfinite_val (eval_options, val_ll, cX)
582
582
feature_lr = get_child (get_child (tree, 1 ), 2 ). feature
583
583
cumulator = get_array (eval_options. buffer, cX, axes (cX, 2 ))
584
- @inbounds @simd for j in axes (cX, 2 )
584
+ @finite @ inbounds @simd for j in axes (cX, 2 )
585
585
x_l = op_l (val_ll, cX[feature_lr, j]):: T
586
586
x = is_valid (x_l) ? op (x_l):: T : T (Inf )
587
587
cumulator[j] = x
@@ -592,7 +592,7 @@ function deg1_l2_ll0_lr0_eval(
592
592
val_lr = get_child (get_child (tree, 1 ), 2 ). val
593
593
@return_on_nonfinite_val (eval_options, val_lr, cX)
594
594
cumulator = get_array (eval_options. buffer, cX, axes (cX, 2 ))
595
- @inbounds @simd for j in axes (cX, 2 )
595
+ @finite @ inbounds @simd for j in axes (cX, 2 )
596
596
x_l = op_l (cX[feature_ll, j], val_lr):: T
597
597
x = is_valid (x_l) ? op (x_l):: T : T (Inf )
598
598
cumulator[j] = x
@@ -602,7 +602,7 @@ function deg1_l2_ll0_lr0_eval(
602
602
feature_ll = get_child (get_child (tree, 1 ), 1 ). feature
603
603
feature_lr = get_child (get_child (tree, 1 ), 2 ). feature
604
604
cumulator = get_array (eval_options. buffer, cX, axes (cX, 2 ))
605
- @inbounds @simd for j in axes (cX, 2 )
605
+ @finite @ inbounds @simd for j in axes (cX, 2 )
606
606
x_l = op_l (cX[feature_ll, j], cX[feature_lr, j]):: T
607
607
x = is_valid (x_l) ? op (x_l):: T : T (Inf )
608
608
cumulator[j] = x
@@ -630,7 +630,7 @@ function deg1_l1_ll0_eval(
630
630
else
631
631
feature_ll = get_child (get_child (tree, 1 ), 1 ). feature
632
632
cumulator = get_array (eval_options. buffer, cX, axes (cX, 2 ))
633
- @inbounds @simd for j in axes (cX, 2 )
633
+ @finite @ inbounds @simd for j in axes (cX, 2 )
634
634
x_l = op_l (cX[feature_ll, j]):: T
635
635
x = is_valid (x_l) ? op (x_l):: T : T (Inf )
636
636
cumulator[j] = x
@@ -659,7 +659,7 @@ function deg2_l0_r0_eval(
659
659
val_l = get_child (tree, 1 ). val
660
660
@return_on_nonfinite_val (eval_options, val_l, cX)
661
661
feature_r = get_child (tree, 2 ). feature
662
- @inbounds @simd for j in axes (cX, 2 )
662
+ @finite @ inbounds @simd for j in axes (cX, 2 )
663
663
x = op (val_l, cX[feature_r, j]):: T
664
664
cumulator[j] = x
665
665
end # COV_EXCL_LINE
@@ -669,7 +669,7 @@ function deg2_l0_r0_eval(
669
669
feature_l = get_child (tree, 1 ). feature
670
670
val_r = get_child (tree, 2 ). val
671
671
@return_on_nonfinite_val (eval_options, val_r, cX)
672
- @inbounds @simd for j in axes (cX, 2 )
672
+ @finite @ inbounds @simd for j in axes (cX, 2 )
673
673
x = op (cX[feature_l, j], val_r):: T
674
674
cumulator[j] = x
675
675
end # COV_EXCL_LINE
@@ -678,7 +678,7 @@ function deg2_l0_r0_eval(
678
678
cumulator = get_array (eval_options. buffer, cX, axes (cX, 2 ))
679
679
feature_l = get_child (tree, 1 ). feature
680
680
feature_r = get_child (tree, 2 ). feature
681
- @inbounds @simd for j in axes (cX, 2 )
681
+ @finite @ inbounds @simd for j in axes (cX, 2 )
682
682
x = op (cX[feature_l, j], cX[feature_r, j]):: T
683
683
cumulator[j] = x
684
684
end # COV_EXCL_LINE
@@ -697,14 +697,14 @@ function deg2_l0_eval(
697
697
if get_child (tree, 1 ). constant
698
698
val = get_child (tree, 1 ). val
699
699
@return_on_nonfinite_val (eval_options, val, cX)
700
- @inbounds @simd for j in eachindex (cumulator)
700
+ @finite @ inbounds @simd for j in eachindex (cumulator)
701
701
x = op (val, cumulator[j]):: T
702
702
cumulator[j] = x
703
703
end # COV_EXCL_LINE
704
704
return ResultOk (cumulator, true )
705
705
else
706
706
feature = get_child (tree, 1 ). feature
707
- @inbounds @simd for j in eachindex (cumulator)
707
+ @finite @ inbounds @simd for j in eachindex (cumulator)
708
708
x = op (cX[feature, j], cumulator[j]):: T
709
709
cumulator[j] = x
710
710
end # COV_EXCL_LINE
@@ -723,14 +723,14 @@ function deg2_r0_eval(
723
723
if get_child (tree, 2 ). constant
724
724
val = get_child (tree, 2 ). val
725
725
@return_on_nonfinite_val (eval_options, val, cX)
726
- @inbounds @simd for j in eachindex (cumulator)
726
+ @finite @ inbounds @simd for j in eachindex (cumulator)
727
727
x = op (cumulator[j], val):: T
728
728
cumulator[j] = x
729
729
end # COV_EXCL_LINE
730
730
return ResultOk (cumulator, true )
731
731
else
732
732
feature = get_child (tree, 2 ). feature
733
- @inbounds @simd for j in eachindex (cumulator)
733
+ @finite @ inbounds @simd for j in eachindex (cumulator)
734
734
x = op (cumulator[j], cX[feature, j]):: T
735
735
cumulator[j] = x
736
736
end # COV_EXCL_LINE
0 commit comments