Yes, check out the section of the manual on calling C and Fortran code.

--Tim

On Saturday, July 26, 2014 08:16:35 AM David A. wrote:
> Sounds good. Would it be possible for the C++ function to have access to
> Julia's arrays without copying them? (ie passing them by reference)
> 
> On Saturday, July 26, 2014 9:21:06 AM UTC-3, Tim Holy wrote:
> > On Friday, July 25, 2014 09:49:47 PM David A. wrote:
> > > Is it possible to parallelize the execution of a C++ function using
> > 
> > Julia?
> > Yes, if you can call the C++ function in the first place. Currently your
> > best
> > bet is to write a C wrapper. There's the very primitive Cpp package, and
> > Keno's got a real solution to the problem over at
> > https://github.com/Keno/CXX.jl, but I don't know if it's really ready for
> > users who are not Keno :).
> > 
> > > And would it be similarly efficient as doing it directly in C++?
> > 
> > Depends on how you do it. You can, of course, just call pthreads from
> > julia
> > (it's a C library, after all). Alternatively start a number of julia
> > processes.
> > 
> > You will want to read the parallel programming section of the manual.
> > 
> > --Tim

Reply via email to