>
> I think I'll go for this idea. For the real project I cannot change the C
> library because it is not mine. So maybe I can overwrite the C variable the
> way you suggest.
To expand slightly, what I meant was that if you have an API like:
compute_large_foo(double* array, int nrows, int ncols)
You can pass a pointer to a Julia array via ccall and avoid copying
individual elements. Although note (correction!) that the default Array
memory layout in Julia is column-major (like Fortran), not row-major (like
C).
On Sun, Jun 21, 2015 at 4:59 PM, Daniel Carrera <[email protected]> wrote:
>
>
> On 21 June 2015 at 22:13, Isaiah Norton <[email protected]> wrote:
>
>> 0.4-dev is not really recommended unless you are somewhat adventurous or
>> you know you need a specific feature.
>>
>
> Is there any estimate on when 0.4 will be stable?
>
>
>
>> (for general use, note also that depending on what APIs you are calling,
>> you could just do the full array-population on the Julia side and pass a
>> pointer to the array because Julia's arrays have C-compatible memory layout)
>>
>
>
> I think I'll go for this idea. For the real project I cannot change the C
> library because it is not mine. So maybe I can overwrite the C variable the
> way you suggest.
>
>
> Cheers,
> Daniel.
>