We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c6ae6dd commit 0039fabCopy full SHA for 0039fab
1 file changed
src/tracked.jl
@@ -60,6 +60,10 @@ TrackedReal(v::V, a::D, tp::InstructionTape, i::Int, o::O) where {V,D,O} = Track
60
61
TrackedReal(v::V, a::D, tp::InstructionTape = NULL_TAPE) where {V,D} = TrackedReal{V,D,Nothing}(v, a, tp)
62
63
+# we define these special cases so that the "constructor <--> convert" pun holds for `TrackedReal`
64
+# this is Jarett's favorite piece of code. A true work of art.
65
+@inline TrackedReal{V,D,O}(x::TrackedReal) where {V,D,O} = convert(TrackedReal{V,D,O}, x)
66
+
67
# TrackedArray #
68
#--------------#
69
0 commit comments