Questions tagged [function-compile]
The function-compile tag has no summary.
39 questions
0
votes
0
answers
91
views
Force the return type in FunctionCompile
I want to force the return type of the function below to be ComplexReal64. Any ideas
...
4
votes
1
answer
237
views
Partially parallel compiled code
I am working with a series of expressions of the following type:
...
9
votes
2
answers
206
views
How can I return an empty list from FunctionCompile?
The following code is for solving a linear congruence of the form $ax=b \; (\mathrm{mod}\ m)$ using FunctionCompile.
...
2
votes
1
answer
531
views
Is it possible to speed up this function?
I need to compile a function that takes 2 lists of vectors and a matrix and takes tensor products and sums them weighting with the matrix elements:
...
6
votes
0
answers
108
views
Listable attribute for functions compiled with FunctionCompile
Is it possible to create Listable compiled code with FunctionCompile in the same way one may do with ...
2
votes
0
answers
80
views
Is it possible to use external functions in CompiledLayer?
I am trying to build a custom layer for my neural network that can perform its computation on the GPU. The function is to be written in C and loaded in Mathematica via the LibraryLink. Is it possible ...
3
votes
1
answer
138
views
Why are Packed Arrays limited to signed machine precision types?
Why are packed arrays limited to only a few types? Particularly, why are integer packed arrays limited to signed integers?
And is there a way to get the same efficiency you get with packed arrays in ...
3
votes
1
answer
88
views
Compilation error while adding two matrices [closed]
Dear Mathematica users,
I would like to compile my function and my sample code is as:
...
0
votes
0
answers
27
views
Compilation of the function that should return vector along with matrix [duplicate]
I am looking for the way how to compile the function that is supposed to return vectors along with matrices. The simplified example looks next:
...
3
votes
2
answers
177
views
Problem compiling derivative of expression
I need to compile functions for an expression and its derivative and then pass these on to a precompiled worker loop for further processing. An If statment detects when the expression parameter expr ...
27
votes
1
answer
843
views
Compile vs FunctionCompile
I wanted to look at the pros & cons of Compile & FunctionCompile. This code below is from Neat Examples in FunctionCompile documentation.
...
1
vote
0
answers
94
views
Are you surprised with the apparent inconsistency in what this CompiledCodeFunction returns?
I am using Mathematica 12.2 with MacOS, and I do this:
...
3
votes
0
answers
80
views
How can I know what prevents efficient lower level code when using FunctionCompile?
When using the old Compile, I can use CompilePrint and ensure the resulting CompiledFunction doesn't use MainEvaluate. If MainEvaluate isn't used, the CompiledFunction is efficient. How do we know if ...
0
votes
1
answer
199
views
1
vote
1
answer
212
views
LMDB Library cannot be loaded by `LibraryLoad`, how to compile properly
I cloned LMDB* from https://github.com/LMDB/lmdb and compiled on a Mac M1 with
make -e clean liblmdb.so CC="cc -target aarch64-macos-none"
which produced ...