@@ -358,11 +358,11 @@ function broadcast_plus(x, y, ::Type{D}) where D
358
358
tp = tape (x, y)
359
359
out = track (value (x) .+ value (y), D, tp)
360
360
cache = (index_bound (x, out), index_bound (y, out))
361
- record! (tp, SpecialInstruction, Base.:( . + ), (x, y), out, cache)
361
+ record! (tp, SpecialInstruction, (broadcast, + ), (x, y), out, cache)
362
362
return out
363
363
end
364
364
365
- @noinline function special_forward_exec! (instruction:: SpecialInstruction{typeof(.+) } )
365
+ @noinline function special_forward_exec! (instruction:: SpecialInstruction{Tuple{ typeof(broadcast),typeof(+)} } )
366
366
a, b = instruction. input
367
367
output = instruction. output
368
368
pull_value! (a)
371
371
return nothing
372
372
end
373
373
374
- @noinline function special_reverse_exec! (instruction:: SpecialInstruction{typeof(.+) } )
374
+ @noinline function special_reverse_exec! (instruction:: SpecialInstruction{Tuple{ typeof(broadcast),typeof(+)} } )
375
375
a, b = instruction. input
376
376
output = instruction. output
377
377
output_deriv = deriv (output)
@@ -389,11 +389,11 @@ function broadcast_minus(x, y, ::Type{D}) where D
389
389
tp = tape (x, y)
390
390
out = track (value (x) .- value (y), D, tp)
391
391
cache = (index_bound (x, out), index_bound (y, out))
392
- record! (tp, SpecialInstruction, Base.:( . - ), (x, y), out, cache)
392
+ record! (tp, SpecialInstruction, (broadcast, - ), (x, y), out, cache)
393
393
return out
394
394
end
395
395
396
- @noinline function special_forward_exec! (instruction:: SpecialInstruction{typeof(.-) } )
396
+ @noinline function special_forward_exec! (instruction:: SpecialInstruction{Tuple{ typeof(broadcast),typeof(-)} } )
397
397
a, b = instruction. input
398
398
output = instruction. output
399
399
pull_value! (a)
402
402
return nothing
403
403
end
404
404
405
- @noinline function special_reverse_exec! (instruction:: SpecialInstruction{typeof(.-) } )
405
+ @noinline function special_reverse_exec! (instruction:: SpecialInstruction{Tuple{ typeof(broadcast),typeof(-)} } )
406
406
a, b = instruction. input
407
407
output = instruction. output
408
408
output_deriv = deriv (output)
@@ -420,11 +420,11 @@ function broadcast_mul(x, y, ::Type{D}) where D
420
420
tp = tape (x, y)
421
421
out = track (value (x) .* value (y), D, tp)
422
422
cache = (index_bound (x, out), index_bound (y, out))
423
- record! (tp, SpecialInstruction, Base.:( . * ), (x, y), out, cache)
423
+ record! (tp, SpecialInstruction, (broadcast, * ), (x, y), out, cache)
424
424
return out
425
425
end
426
426
427
- @noinline function special_forward_exec! (instruction:: SpecialInstruction{typeof(.*) } )
427
+ @noinline function special_forward_exec! (instruction:: SpecialInstruction{Tuple{ typeof(broadcast),typeof(*)} } )
428
428
a, b = instruction. input
429
429
output = instruction. output
430
430
pull_value! (a)
433
433
return nothing
434
434
end
435
435
436
- @noinline function special_reverse_exec! (instruction:: SpecialInstruction{typeof(.*) } )
436
+ @noinline function special_reverse_exec! (instruction:: SpecialInstruction{Tuple{ typeof(broadcast),typeof(*)} } )
437
437
a, b = instruction. input
438
438
output = instruction. output
439
439
output_deriv = deriv (output)
@@ -467,11 +467,11 @@ function broadcast_rdiv(x, y, ::Type{D}) where D
467
467
cache = (n_partials, d_partials,
468
468
index_bound (x, out), index_bound (y, out),
469
469
index_bound (n_partials, out), index_bound (d_partials, out))
470
- record! (tp, SpecialInstruction, Base.:( . / ), (x, y), out, cache)
470
+ record! (tp, SpecialInstruction, (broadcast, / ), (x, y), out, cache)
471
471
return out
472
472
end
473
473
474
- @noinline function special_forward_exec! (instruction:: SpecialInstruction{typeof(./) } )
474
+ @noinline function special_forward_exec! (instruction:: SpecialInstruction{Tuple{ typeof(broadcast),typeof(/)} } )
475
475
a, b = instruction. input
476
476
a_value, b_value = value (a), value (b)
477
477
n_partials, d_partials = instruction. cache
484
484
return nothing
485
485
end
486
486
487
- @noinline function special_reverse_exec! (instruction:: SpecialInstruction{typeof(./) } )
487
+ @noinline function special_reverse_exec! (instruction:: SpecialInstruction{Tuple{ typeof(broadcast),typeof(/)} } )
488
488
a, b = instruction. input
489
489
output = instruction. output
490
490
output_deriv = deriv (output)
@@ -506,11 +506,11 @@ function broadcast_ldiv(x, y, ::Type{D}) where D
506
506
cache = (n_partials, d_partials,
507
507
index_bound (x, out), index_bound (y, out),
508
508
index_bound (n_partials, out), index_bound (d_partials, out))
509
- record! (tp, SpecialInstruction, Base.:( . \ ), (x, y), out, cache)
509
+ record! (tp, SpecialInstruction, (broadcast, \ ), (x, y), out, cache)
510
510
return out
511
511
end
512
512
513
- @noinline function special_forward_exec! (instruction:: SpecialInstruction{typeof(.\) } )
513
+ @noinline function special_forward_exec! (instruction:: SpecialInstruction{Tuple{ typeof(broadcast),typeof(\)} } )
514
514
a, b = instruction. input
515
515
a_value, b_value = value (a), value (b)
516
516
n_partials, d_partials = instruction. cache
523
523
return nothing
524
524
end
525
525
526
- @noinline function special_reverse_exec! (instruction:: SpecialInstruction{typeof(.\) } )
526
+ @noinline function special_reverse_exec! (instruction:: SpecialInstruction{Tuple{ typeof(broadcast),typeof(\)} } )
527
527
a, b = instruction. input
528
528
output = instruction. output
529
529
output_deriv = deriv (output)
@@ -563,11 +563,11 @@ function broadcast_pow(x, y, ::Type{D}) where D
563
563
cache = (bs_partials, ex_partials,
564
564
index_bound (x, out), index_bound (y, out),
565
565
index_bound (bs_partials, out), index_bound (ex_partials, out))
566
- record! (tp, SpecialInstruction, Base.:( . ^ ), (x, y), out, cache)
566
+ record! (tp, SpecialInstruction, (broadcast, ^ ), (x, y), out, cache)
567
567
return out
568
568
end
569
569
570
- @noinline function special_forward_exec! (instruction:: SpecialInstruction{typeof(.^) } )
570
+ @noinline function special_forward_exec! (instruction:: SpecialInstruction{Tuple{ typeof(broadcast),typeof(^)} } )
571
571
a, b = instruction. input
572
572
a_value, b_value = value (a), value (b)
573
573
bs_partials, ex_partials = instruction. cache
580
580
return nothing
581
581
end
582
582
583
- @noinline function special_reverse_exec! (instruction:: SpecialInstruction{typeof(.^) } )
583
+ @noinline function special_reverse_exec! (instruction:: SpecialInstruction{Tuple{ typeof(broadcast),typeof(^)} } )
584
584
a, b = instruction. input
585
585
output = instruction. output
586
586
output_deriv = deriv (output)
0 commit comments