Questions about the generation and use of compiled functions using Compile.

learn more… | top users | synonyms

0
votes
1answer
178 views

Function won't compile. Is there a workaround?

Here's a simplified form of a function I would like to compile, but it produces errors ...
18
votes
0answers
156 views

M9 performance regression for Fold?

I noticed an over 10x performance drop on Mathematica v9.0.1 (as Oleksandr R. commented, also v8) compared with v7.01 for this code: ...
9
votes
0answers
132 views

Compile not correctly initializing a variable defined inside Module

In the following example, inside the minimumX's Module, x is initialized to 1, but the ...
8
votes
0answers
125 views

Check whether a working CCompiler is installed

Let me give a bit background: As many of my answers imply, I often use the auto-parallelization (meaning, that Mathematica distributes the calculation automatically over several cores when ...
7
votes
0answers
201 views

Compile recursive function modifying global variables

How to compile recursive formula when it relies on more than a few global variables (global to the topmost compiled function)? It is unreasonable to pass on all such variables to each recursive ...
7
votes
0answers
223 views

Using Compile to speed up Function with PermutationProduct

I have the following fairly simple routine dot involving PermutationProduct that I wish to speed up using ...
6
votes
0answers
92 views

Compiled function crashes kernel when trying to list over different length arguments

I'm trying to speed up a tally/binning operation that I have to run many times. I have many lists of between 1 and 10 numbers from the range [1,5] and I want to ...
5
votes
0answers
344 views

Having problems compiling Mathematica Cuda code

Ok I am trying to follow the examples of Cuda Code in the docummentation Run the CUDAQ[] and get back a True and run some of ...
2
votes
0answers
48 views

Compiling/calling Mathematica-generated .so from C

I'm trying to call a compiled function from a C program. I am generating the static object ...
2
votes
0answers
171 views

Listing over multiple inputs (tensor rank > 1) in a compiled function

I'm trying to optimize the solution given by Michael E2 to my previous problem (Efficiently determining if 3D points are within a surface composed of polygons) which I figured would be relatively ...
2
votes
0answers
140 views
1
vote
0answers
34 views

Linear interpolation over 2 variables

I'm tuning a function to data over 4-5 variables using Differential Evolution. The objective function calls frequently interpolation function. I came to a point, where compiling the objective function ...
1
vote
0answers
41 views

Challenge: Creating Compilable Permutations Function

As Mathematica's implemented Permuations function is not compilable I tried to write my very own Permutations implementation, called ...
1
vote
0answers
75 views

Compiled version of user-defined function

I have a function for parameter estimation with these codes: ...
1
vote
0answers
89 views

Using Part within a Compiled Command

I'm looking to define a multi-line function that makes use of the "Part" command. A toy example: ...
1
vote
0answers
73 views

How can I compile function with Apply?

For example, I tried to compile this function but Mathematica gives "The only function arguments supported are Times, Plus, or List", I have no a way to compile this. ...