glob2-devel
[Top][All Lists]
Advanced

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

Re: [glob2-devel] gradient improvement


From: Kai Antweiler
Subject: Re: [glob2-devel] gradient improvement
Date: Fri, 07 Apr 2006 16:36:38 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Jumbo Shrimp, linux)

Sorry.
Should have been:

After:  (line 2280)
        while ( listCountRead < listCountWrite ) 
        { 
Put:
                // Check if listedAddr could have an overflow 
                // The current field can spawn 8 fields at maximum 
                if( listCountWrite+8 >= listCountRead+size ) 
                { 
                        size_t oldsize = size; 
                        size<<1;   // Double the size of the map the map.
                                   // Since this will only be used in context
                                   // of listedAddr (and will be changed back)
                                   // this should not cause flaws in the other
                                   // parts of the code.

                        FILE *MapLog = 
globalContainer->logFileManager->getFile("Map"); 
                        fprintf(MapLog, "changed size to %d, Gradient Type: 
%d\n", size, gradientType); 

                        Tint *listedAddrTmp = new Tint[size];
                        for(int i=0; i < listCountWrite-listCountRead; i++) 
                                *listedAddrTmp[i] = 
listedAddr[(i+listCountRead)&oldsize]; 
                        updateGlobalGradientVersionSimple<Tint>(gradient, 
listedAddrTmp, listCountWrite-listCountRead, gradientType); 
                        size>>1;   // change back to previous size
                        return;
                } 


-- 
Kai Antweiler





reply via email to

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