Message Boards Message Boards

1 Reply
2 Total Likes
View groups...
Share this post:

Need help optimizing a compiled function.

Posted 11 years ago
Currently, I have the following structure:
Function1 = Interpolation[Flatten[MATRIX, 1]];
I then call the function at some point as
This all works well.

Later on, I do:
Function2 = Compile[

Table = Table[Function1[Table, x2], {k, 1, Length[Table]}];

RuntimeAttributes -> {Listable}, Parallelization -> True, CompilationTarget :> "C"];

Again, this works. However, I've narrowed down the time consuming step of my code to be here.
When I use:
I get:
Compile::noinfo: No information is available for compilation of Function1[Table,x2]. The compiler will use an external evaluation and make assumptions about the return type. >>

So, I guess the question, is there a way for me to incorporate the original function within the Compile I do for function2?

Thanks so much.
POSTED BY: Jordan Hoffmann
The problem is the Compile does not supportĀ Interpolation, so it will call the main evaluator. One way around that is to implement your own interpolator, but that requires a bit more code.
POSTED BY: Abdul Dakkak
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract