[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: surface cdata property restricted to double or uint8
From: |
Jaroslav Hajek |
Subject: |
Re: surface cdata property restricted to double or uint8 |
Date: |
Mon, 30 Aug 2010 07:12:36 +0200 |
On Mon, Aug 30, 2010 at 6:47 AM, Shai Ayal <address@hidden> wrote:
> On Mon, Aug 30, 2010 at 7:35 AM, John W. Eaton <address@hidden> wrote:
>> On 30-Aug-2010, Shai Ayal wrote:
>>
>> | Maybe I'm misunderstanding the original code, but doesn't it also
>> | convert the whole array to double? In this case we loose no
>> | performance by converting beforehand when compared to the original
>> | code.
>>
>> Yes, but since the conversion happens for only one element at a time,
>> it requires less memory. Converting the whole array at once requires
>> twice the storage of a single precision array for the temporary
>> variable. The current code only requires 8 additional bytes.
>>
> OK, didn't think of the memory overhead. Since people have a tendency
> to use large datasets for surface (e.g. a 12MP image as a surface) I
> think memory could be an issue, and I think I understand now why
> Michael Goffioul wrote it this way. I think we should use the
> optimized version.
>
> Shai
>
>
If I see right, however, you save the space for lda doubles, but there
are already two arrays of 3*lda doubles around (cmapv and av), which
means you'll save 14% memory at best. That is really not much in
Octave's context. I would likewise prefer the simpler change.
regards
--
RNDr. Jaroslav Hajek, PhD
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
- surface cdata property restricted to double or uint8, John W. Eaton, 2010/08/27
- Re: surface cdata property restricted to double or uint8, Shai Ayal, 2010/08/29
- Re: surface cdata property restricted to double or uint8, John W. Eaton, 2010/08/29
- Re: surface cdata property restricted to double or uint8, Shai Ayal, 2010/08/30
- Re: surface cdata property restricted to double or uint8, John W. Eaton, 2010/08/30
- Re: surface cdata property restricted to double or uint8, Shai Ayal, 2010/08/30
- Re: surface cdata property restricted to double or uint8,
Jaroslav Hajek <=
- Re: surface cdata property restricted to double or uint8, John W. Eaton, 2010/08/30
- Re: surface cdata property restricted to double or uint8, Michael Goffioul, 2010/08/30
- Re: surface cdata property restricted to double or uint8, Jaroslav Hajek, 2010/08/30
- Re: surface cdata property restricted to double or uint8, Michael Goffioul, 2010/08/30
- Re: surface cdata property restricted to double or uint8, Jaroslav Hajek, 2010/08/30
- Re: surface cdata property restricted to double or uint8, Michael Goffioul, 2010/08/30
- Re: surface cdata property restricted to double or uint8, Jaroslav Hajek, 2010/08/30
- Re: surface cdata property restricted to double or uint8, Michael Goffioul, 2010/08/30
- Re: surface cdata property restricted to double or uint8, Jaroslav Hajek, 2010/08/30
- Re: surface cdata property restricted to double or uint8, Michael Goffioul, 2010/08/30