Skip to content

Commit

Permalink
document generic function restriction, closes #72
Browse files Browse the repository at this point in the history
  • Loading branch information
jrevels committed Dec 7, 2015
1 parent 8d46e76 commit dd74a42
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/source/perf_diff.rst
Expand Up @@ -6,6 +6,8 @@ Restrictions on the target function

ForwardDiff.jl can only differentiate functions that adhere to the following rules:

- **The function can only be composed of generic Julia functions.** ForwardDiff cannot propagate derivative information through non-Julia code. Thus, your function may not work if it makes calls to external, non-Julia programs, e.g. uses explicit BLAS calls instead of ``Ax_mul_Bx``-style functions.

- **The function must be unary (i.e., only accept a single argument).** The ``jacobian`` function is the exception to this restriction; see below for details.

- **The function must accept an argument whose type is a subtype of** ``Vector`` **or** ``Real``. The argument type does not need to be annotated in the function definition.
Expand Down

0 comments on commit dd74a42

Please sign in to comment.