Skip to content

Commit f783dff

Browse files
authored
Add some basic exports (#22)
Currently this just exports the very basics, with minimal chance of name collision with other packages and/or user code.
1 parent 4a77b5b commit f783dff

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/ChainRules.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ using Base.Broadcast: materialize, materialize!, broadcasted, Broadcasted, broad
66

77
import NaNMath, SpecialFunctions, LinearAlgebra, LinearAlgebra.BLAS
88

9+
export AbstractRule, Rule, frule, rrule
10+
911
include("differentials.jl")
1012
include("rules.jl")
1113
include("rules/base.jl")

src/rules.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ unary input, unary output scalar function:
244244
```julia-repl
245245
julia> x = rand();
246246
247-
julia> sinx, dsin = ChainRules.frule(sin, x);
247+
julia> sinx, dsin = frule(sin, x);
248248
249249
julia> sinx == sin(x)
250250
true
@@ -258,7 +258,7 @@ unary input, binary output scalar function:
258258
```julia-repl
259259
julia> x = rand();
260260
261-
julia> sincosx, (dsin, dcos) = ChainRules.frule(sincos, x);
261+
julia> sincosx, (dsin, dcos) = frule(sincos, x);
262262
263263
julia> sincosx == sincos(x)
264264
true
@@ -300,7 +300,7 @@ unary input, unary output scalar function:
300300
```julia-repl
301301
julia> x = rand();
302302
303-
julia> sinx, dx = ChainRules.rrule(sin, x);
303+
julia> sinx, dx = rrule(sin, x);
304304
305305
julia> sinx == sin(x)
306306
true
@@ -314,7 +314,7 @@ binary input, unary output scalar function:
314314
```julia-repl
315315
julia> x, y = rand(2);
316316
317-
julia> hypotxy, (dx, dy) = ChainRules.rrule(hypot, x, y);
317+
julia> hypotxy, (dx, dy) = rrule(hypot, x, y);
318318
319319
julia> hypotxy == hypot(x, y)
320320
true

test/runtests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# TODO: more tests!
22

33
using ChainRules, Test, FDM, LinearAlgebra, Random
4-
using ChainRules: rrule, frule, extern, accumulate, accumulate!, store!, @scalar_rule,
4+
using ChainRules: extern, accumulate, accumulate!, store!, @scalar_rule,
55
Wirtinger, wirtinger_primal, wirtinger_conjugate, add_wirtinger, mul_wirtinger,
66
Zero, add_zero, mul_zero, One, add_one, mul_one, Casted, cast, add_casted, mul_casted,
7-
DNE, Thunk, Casted, Wirtinger
7+
DNE, Thunk, Casted
88
using Base.Broadcast: broadcastable
99

1010
include("test_util.jl")

0 commit comments

Comments
 (0)