Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Change Rank in Compile

  • To: mathgroup at
  • Subject: [mg16046] Change Rank in Compile
  • From: Klamser at (Klamser)
  • Date: Sun, 21 Feb 1999 00:15:20 -0500
  • Sender: owner-wri-mathgroup at

Can someone tell me please who I can use a bigger array in a compiled

    Block[{i=1,s=0.0,x=0.0},s=0.0;Do[x=Take[v,i];s=s+x 2,{i,10}]]]

With the Value of 120 I get the message:

    "Rank specification \!\(120\) in \!\({v, _Real, 120}\) exceeds the
rank \
limit (\!\(100\))."

Options[Compile] does not give further information.

The Attributes of Compile are: Attributes[Compile]


And ??Compile tells

"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."

Can I change Rank?

    Block[{i=1,s=0.0,x=0.0},s=0.0;Do[x=Take[v,i];s=s+x 2,{i,10}]]]

gives the error message

    "Variable \!\(x\) of type \!\({\"_Real\", 0}\) encountered in
assignment \
of type \!\({\"_Real\", 10}\)."

On this I could not either find a way out.

Yours sincerely Peter Klamser

  • Prev by Date: Re: Re: Bug?
  • Next by Date: Re: Q: Union and SameTest Option
  • Previous by thread: telling DSolve to satisfy boundary conditions?
  • Next by thread: Re: Change Rank in Compile