Skip to content

Commit a77d24f

Browse files
committed
feat: assume @simd for kernel loops
1 parent a09dba0 commit a77d24f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Evaluate.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ function deg1_l2_ll0_lr0_eval(
581581
@return_on_nonfinite_val(eval_options, val_ll, cX)
582582
feature_lr = get_child(get_child(tree, 1), 2).feature
583583
cumulator = get_array(eval_options.buffer, cX, axes(cX, 2))
584-
@finite @inbounds @simd for j in axes(cX, 2)
584+
@finite @inbounds @simd ivdep for j in axes(cX, 2)
585585
x_l = op_l(val_ll, cX[feature_lr, j])::T
586586
x = is_valid(x_l) ? op(x_l)::T : T(Inf)
587587
cumulator[j] = x
@@ -592,7 +592,7 @@ function deg1_l2_ll0_lr0_eval(
592592
val_lr = get_child(get_child(tree, 1), 2).val
593593
@return_on_nonfinite_val(eval_options, val_lr, cX)
594594
cumulator = get_array(eval_options.buffer, cX, axes(cX, 2))
595-
@finite @inbounds @simd for j in axes(cX, 2)
595+
@finite @inbounds @simd ivdep for j in axes(cX, 2)
596596
x_l = op_l(cX[feature_ll, j], val_lr)::T
597597
x = is_valid(x_l) ? op(x_l)::T : T(Inf)
598598
cumulator[j] = x
@@ -602,7 +602,7 @@ function deg1_l2_ll0_lr0_eval(
602602
feature_ll = get_child(get_child(tree, 1), 1).feature
603603
feature_lr = get_child(get_child(tree, 1), 2).feature
604604
cumulator = get_array(eval_options.buffer, cX, axes(cX, 2))
605-
@finite @inbounds @simd for j in axes(cX, 2)
605+
@finite @inbounds @simd ivdep for j in axes(cX, 2)
606606
x_l = op_l(cX[feature_ll, j], cX[feature_lr, j])::T
607607
x = is_valid(x_l) ? op(x_l)::T : T(Inf)
608608
cumulator[j] = x

0 commit comments

Comments
 (0)