@@ -11,9 +11,7 @@ import ..ExtensionInterfaceModule: bumper_eval_tree_array, _is_loopvectorization
1111import .. ValueInterfaceModule: is_valid, is_valid_array
1212
1313# Overloaded by SpecialOperators.jl:
14- function any_special_operators (_)
15- return false
16- end
14+ function any_special_operators end
1715function special_operator end
1816function deg2_eval_special end
1917function deg1_eval_special end
@@ -226,7 +224,7 @@ function eval_tree_array(
226224 " Bumper and LoopVectorization features are only compatible with numeric element types" ,
227225 )
228226 end
229- if any_special_operators (typeof ( operators) )
227+ if any_special_operators (operators)
230228 cX = copy (cX)
231229 # TODO : This is dangerous if the element type is mutable
232230 end
338336 eval_options:: EvalOptions ,
339337) where {T}
340338 nbin = get_nbin (operators)
341- special_operators = any_special_operators (operators)
342339 long_compilation_time = nbin > OPERATOR_LIMIT_BEFORE_SLOWDOWN
343340 if long_compilation_time
344341 return quote
370367 @return_on_nonfinite_array (eval_options, result_l. x)
371368 # op(x, y), where y is a constant or variable but x is not.
372369 deg2_r0_eval (tree, result_l. x, cX, op, eval_options)
373- elseif ! $ (special_operators ) && tree. l. degree == 0
370+ elseif ! any_special_operators (operators ) && tree. l. degree == 0
374371 # This branch changes the execution order, so we cannot
375372 # use this branch when special operators are present.
376373 result_r = _eval_tree_array (tree. r, cX, operators, eval_options)
400397 eval_options:: EvalOptions ,
401398) where {T}
402399 nuna = get_nuna (operators)
403- special_operators = any_special_operators (operators)
404400 long_compilation_time = nuna > OPERATOR_LIMIT_BEFORE_SLOWDOWN
405401 if long_compilation_time
406402 return quote
422418 i -> let op = operators. unaops[i]
423419 if special_operator (op)
424420 deg1_eval_special (tree, cX, operators, op, eval_options)
425- elseif ! $ (special_operators ) &&
421+ elseif ! any_special_operators (operators ) &&
426422 tree. l. degree == 2 &&
427423 tree. l. l. degree == 0 &&
428424 tree. l. r. degree == 0
431427 dispatch_deg1_l2_ll0_lr0_eval (
432428 tree, cX, op, l_op_idx, operators. binops, eval_options
433429 )
434- elseif ! $ (special_operators) && tree. l. degree == 1 && tree. l. l. degree == 0
430+ elseif ! any_special_operators (operators) &&
431+ tree. l. degree == 1 &&
432+ tree. l. l. degree == 0
435433 # op(op2(x)), where x is a constant or variable.
436434 l_op_idx = tree. l. op
437435 dispatch_deg1_l1_ll0_eval (
0 commit comments