[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: surface cdata property restricted to double or uint8
From: |
Shai Ayal |
Subject: |
Re: surface cdata property restricted to double or uint8 |
Date: |
Mon, 30 Aug 2010 07:47:46 +0300 |
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
- 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 <=
- Re: surface cdata property restricted to double or uint8, Jaroslav Hajek, 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, 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