Compile
Usage Message: Compile[{x1, x2, ... }, expr] creates a compiled function which evaluates expr assuming numerical
values of the xi. Compile[{{x1, t1}, ... }, expr] assumes that xi is of a type which matches ti. Compile[{{x1, t1, n1}, ... }, expr] assumes that xi is a
rank ni array of objects each of a type which matches ti. Compile[vars, expr, {{p1, pt1}, ... }] assumes that subexpressions in expr which match pi are of
types which match pti. Attributes[Compile] = {HoldAll, Protected} Related Symbols:
Compiled
, CompiledFunction
, Dispatch
, Function
, InterpolatingFunction
Notes: The Compile function converts a subset of the Mathematica programming language into a form (a CompiledFunction
expression) that can be evaluated more efficiently than the original expression. The subset of the Mathematica programming language that can be usefully
compiled is described here. The four expression types that can be handled by the compiler are _Real (machine real numbers), _Integer
(machine integers), _Complex (complex numbers with machine real components), and True|False (boolean expressions). In Mathematica
Version 3.0, the compiler can also handle arrays of elements, provided all of the elements are of the same type. The part of Mathematica that handles
evaluation of CompiledFunction
expressions is called the CompiledFunction
interpreter. Compiled evaluation refers to evaluation that is handled within the CompiledFunction
interpreter. Compiled evaluation will normally be more efficient than uncompiled evaluation. The following table gives the functions that are handled
within the CompiledFunction
interpreter in Version 3.0 of Mathematica. With few exceptions (such as Function, which is handled in a special way), computations involving functions that are not on this list are handled by calling uncompiled evaluation. Abs AddTo And Append AppendTo Apply ArcCos ArcCosh ArcCot ArcCoth ArcCsc ArcCsch ArcSec ArcSech ArcSin ArcSinh ArcTan ArcTanh Arg Array Block Break Cases Catalan Catch Ceiling Chop Complement ComposeList CompoundExpression Conjugate Continue Cos Cosh | Cot Coth Count Csc Csch Decrement Degree Delete DeleteCases Det DiagonalMatrix Dimensions Divide DivideBy Do Dot Drop E Equal EulerE EvenQ Exp False First FixedPoint FixedPointList Flatten Floor Fold FoldList For FreeQ GoldenRatio Goto | Greater GreaterEqual I IdentityMatrix If Im Implies Increment Insert IntegerDigits Intersection Inverse Join Label Last Length Less LessEqual List Log Map MapAll MapAt MapIndexed MapThread MatrixQ Max MemberQ Min Minus Mod Module N Negative | Nest NestList NonNegative Not OddQ Or OrderedQ Outer Part Partition Permutations Pi Plus Position Positive Power PreDecrement PreIncrement Prepend PrependTo Product Quotient Random Range Re ReplacePart Rest Return Reverse RotateLeft RotateRight Round SameQ Scan | Sec Sech Select Set Sign Sin Sinh Sort Sqrt Subtract SubtractFrom Sum Switch Table Take Tan Tanh TensorRank Throw Times TimesBy Transpose True Unequal Union UnsameQ VectorQ Which While With Xor |
Additional Online Documentation:
Mathematica 3.0
http://documents.wolfram.com/v3/RefGuide/Compile.html
Mathematica 4.0
http://documents.wolfram.com/v4/RefGuide/Compile.html
Questions or comments? Send email to support@wolfram.com.
| |