MathGroup Archive 2003

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

Search the Archive

Re: Compile Module w/ Function inside?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg42269] Re: Compile Module w/ Function inside?
  • From: frankeye at cox.net (Frank Iannarilli)
  • Date: Thu, 26 Jun 2003 05:36:24 -0400 (EDT)
  • References: <bdbdoj$28a$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

scwoods at taz.qinetiq.com (Simon Woods) wrote in message news:<bdbdoj$28a$1 at smc.vnet.net>...
> Try this:
> 
> foo = With[{q = Function[p,2*p]},Compile[{x},q[x]]]
> 
> Not sure if this is what you wanted - I think the With function
> replaces q with the pure function before Compiling, effectively doing
> the "in-lining" for you.
> 
> Simon.
>


Hip-Hip-Horay!!  Thank you, Simon!  This works!  foo is a Compile'd
function using "pure" opcodes.


  • Prev by Date: 3D plot of error function of neural network
  • Next by Date: Re: Minimization
  • Previous by thread: RE: Compile Module w/ Function inside?
  • Next by thread: Re: Compile Module w/ Function inside?