Le mardi 24 février 2015 à 01:13 -0800, [email protected] a
écrit :
> Hello,
>
> I am a beginner to Julia and would like to try out some features. I
> would like to improve performances of some bottleneck functions by
> translating them into C.
Do you think that's really necessary? One of the main goals of Julia is
to make it possible to write efficient code without mixing a high-level
and a low-level language. Carefully written Julia code should be quite
close to C in terms of performance.
> A simple example is :
> main.jl
>
> a ::Int64 = 20
> b ::Int64 = 10
> ccall(:do_sum, Int64, (Int64, Int64), a, b)
>
>
>
> test.c
> #include <stdio.h>
>
> int do_sum (int a,int b)
> {
> int c;
> c = a+b;
> printf("f\n:",c);
> return c;
> }
>
> where should I put the C file ?
I think you should have a look at this thread:
https://groups.google.com/d/msg/julia-users/VeaoUzvEwZQ/1Pa_IClBvYIJ
(This could probably go into the manual at some point.)
Regards