octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rethinking octave_idx_type


From: John W. Eaton
Subject: Re: Rethinking octave_idx_type
Date: Sat, 26 Nov 2016 17:21:39 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0

On 11/25/2016 05:04 PM, Philip Nienhuis wrote:
John W. Eaton wrote
Currently we define octave_idx_type to be the same as the integer type
used by BLAS, LAPACK, and other functions that have a "Fortran"
interface.  By default, this means 32-bit integers even on 64-bit
systems and arrays are limited to less than 2^31 elements.  This affects
all of Octave, even if you don't actually want to pass large arrays to
the functions that actually have these size limits.

Instead, it seems that we could define octave_idx_type to be ssize_t (or
ptrdiff_t, I think they are equivalent in practice).  Then things like
fread, fwrite, or simple element-by-element array operations that don't
require BLAS or LAPACK functions could work on larger arrays.

Then we would also define something like fortran_integer_type for the
Fortran-style function interfaces and check array sizes and limits when
we actually call the Fortran-style functions.

Does anyone see a reason NOT to do this?

Would the current OF packages be affected?

It would affect any that call Fortran functions and that assume that octave_idx_type is equivalent to the Fortran INTEGER type.

jwe





reply via email to

[Prev in Thread] Current Thread [Next in Thread]