@@ -358,11 +358,11 @@ function broadcast_plus(x, y, ::Type{D}) where D
358358    tp =  tape (x, y)
359359    out =  track (value (x) .+  value (y), D, tp)
360360    cache =  (index_bound (x, out), index_bound (y, out))
361-     record! (tp, SpecialInstruction, Base.:( . +
361+     record! (tp, SpecialInstruction, (broadcast,  + ), (x, y), out, cache)
362362    return  out
363363end 
364364
365- @noinline  function  special_forward_exec! (instruction:: SpecialInstruction{typeof(.+) } )
365+ @noinline  function  special_forward_exec! (instruction:: SpecialInstruction{Tuple{ typeof(broadcast),typeof(+)} } )
366366    a, b =  instruction. input
367367    output =  instruction. output
368368    pull_value! (a)
371371    return  nothing 
372372end 
373373
374- @noinline  function  special_reverse_exec! (instruction:: SpecialInstruction{typeof(.+) } )
374+ @noinline  function  special_reverse_exec! (instruction:: SpecialInstruction{Tuple{ typeof(broadcast),typeof(+)} } )
375375    a, b =  instruction. input
376376    output =  instruction. output
377377    output_deriv =  deriv (output)
@@ -389,11 +389,11 @@ function broadcast_minus(x, y, ::Type{D}) where D
389389    tp =  tape (x, y)
390390    out =  track (value (x) .-  value (y), D, tp)
391391    cache =  (index_bound (x, out), index_bound (y, out))
392-     record! (tp, SpecialInstruction, Base.:( . -
392+     record! (tp, SpecialInstruction, (broadcast,  - ), (x, y), out, cache)
393393    return  out
394394end 
395395
396- @noinline  function  special_forward_exec! (instruction:: SpecialInstruction{typeof(.-) } )
396+ @noinline  function  special_forward_exec! (instruction:: SpecialInstruction{Tuple{ typeof(broadcast),typeof(-)} } )
397397    a, b =  instruction. input
398398    output =  instruction. output
399399    pull_value! (a)
402402    return  nothing 
403403end 
404404
405- @noinline  function  special_reverse_exec! (instruction:: SpecialInstruction{typeof(.-) } )
405+ @noinline  function  special_reverse_exec! (instruction:: SpecialInstruction{Tuple{ typeof(broadcast),typeof(-)} } )
406406    a, b =  instruction. input
407407    output =  instruction. output
408408    output_deriv =  deriv (output)
@@ -420,11 +420,11 @@ function broadcast_mul(x, y, ::Type{D}) where D
420420    tp =  tape (x, y)
421421    out =  track (value (x) .*  value (y), D, tp)
422422    cache =  (index_bound (x, out), index_bound (y, out))
423-     record! (tp, SpecialInstruction, Base.:( . *
423+     record! (tp, SpecialInstruction, (broadcast,  * ), (x, y), out, cache)
424424    return  out
425425end 
426426
427- @noinline  function  special_forward_exec! (instruction:: SpecialInstruction{typeof(.*) } )
427+ @noinline  function  special_forward_exec! (instruction:: SpecialInstruction{Tuple{ typeof(broadcast),typeof(*)} } )
428428    a, b =  instruction. input
429429    output =  instruction. output
430430    pull_value! (a)
433433    return  nothing 
434434end 
435435
436- @noinline  function  special_reverse_exec! (instruction:: SpecialInstruction{typeof(.*) } )
436+ @noinline  function  special_reverse_exec! (instruction:: SpecialInstruction{Tuple{ typeof(broadcast),typeof(*)} } )
437437    a, b =  instruction. input
438438    output =  instruction. output
439439    output_deriv =  deriv (output)
@@ -467,11 +467,11 @@ function broadcast_rdiv(x, y, ::Type{D}) where D
467467    cache =  (n_partials, d_partials,
468468             index_bound (x, out), index_bound (y, out),
469469             index_bound (n_partials, out), index_bound (d_partials, out))
470-     record! (tp, SpecialInstruction, Base.:( . /
470+     record! (tp, SpecialInstruction, (broadcast,  / ), (x, y), out, cache)
471471    return  out
472472end 
473473
474- @noinline  function  special_forward_exec! (instruction:: SpecialInstruction{typeof(./) } )
474+ @noinline  function  special_forward_exec! (instruction:: SpecialInstruction{Tuple{ typeof(broadcast),typeof(/)} } )
475475    a, b =  instruction. input
476476    a_value, b_value =  value (a), value (b)
477477    n_partials, d_partials =  instruction. cache
484484    return  nothing 
485485end 
486486
487- @noinline  function  special_reverse_exec! (instruction:: SpecialInstruction{typeof(./) } )
487+ @noinline  function  special_reverse_exec! (instruction:: SpecialInstruction{Tuple{ typeof(broadcast),typeof(/)} } )
488488    a, b =  instruction. input
489489    output =  instruction. output
490490    output_deriv =  deriv (output)
@@ -506,11 +506,11 @@ function broadcast_ldiv(x, y, ::Type{D}) where D
506506    cache =  (n_partials, d_partials,
507507             index_bound (x, out), index_bound (y, out),
508508             index_bound (n_partials, out), index_bound (d_partials, out))
509-     record! (tp, SpecialInstruction, Base.:( . \
509+     record! (tp, SpecialInstruction, (broadcast,  \ ), (x, y), out, cache)
510510    return  out
511511end 
512512
513- @noinline  function  special_forward_exec! (instruction:: SpecialInstruction{typeof(.\) } )
513+ @noinline  function  special_forward_exec! (instruction:: SpecialInstruction{Tuple{ typeof(broadcast),typeof(\)} } )
514514    a, b =  instruction. input
515515    a_value, b_value =  value (a), value (b)
516516    n_partials, d_partials =  instruction. cache
523523    return  nothing 
524524end 
525525
526- @noinline  function  special_reverse_exec! (instruction:: SpecialInstruction{typeof(.\) } )
526+ @noinline  function  special_reverse_exec! (instruction:: SpecialInstruction{Tuple{ typeof(broadcast),typeof(\)} } )
527527    a, b =  instruction. input
528528    output =  instruction. output
529529    output_deriv =  deriv (output)
@@ -563,11 +563,11 @@ function broadcast_pow(x, y, ::Type{D}) where D
563563    cache =  (bs_partials, ex_partials,
564564             index_bound (x, out), index_bound (y, out),
565565             index_bound (bs_partials, out), index_bound (ex_partials, out))
566-     record! (tp, SpecialInstruction, Base.:( . ^
566+     record! (tp, SpecialInstruction, (broadcast,  ^ ), (x, y), out, cache)
567567    return  out
568568end 
569569
570- @noinline  function  special_forward_exec! (instruction:: SpecialInstruction{typeof(.^) } )
570+ @noinline  function  special_forward_exec! (instruction:: SpecialInstruction{Tuple{ typeof(broadcast),typeof(^)} } )
571571    a, b =  instruction. input
572572    a_value, b_value =  value (a), value (b)
573573    bs_partials, ex_partials =  instruction. cache
580580    return  nothing 
581581end 
582582
583- @noinline  function  special_reverse_exec! (instruction:: SpecialInstruction{typeof(.^) } )
583+ @noinline  function  special_reverse_exec! (instruction:: SpecialInstruction{Tuple{ typeof(broadcast),typeof(^)} } )
584584    a, b =  instruction. input
585585    output =  instruction. output
586586    output_deriv =  deriv (output)
0 commit comments