Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  compact.c   Sprache: C

 
/****************************************************************************
**
*A  compact.c                   ANUPQ source                   Eamonn O'Brien
**
*Y  Copyright 1995-2001,  Lehrstuhl D fuer Mathematik,  RWTH Aachen,  Germany
*Y  Copyright 1995-2001,  School of Mathematical Sciences, ANU,     Australia
**
*/


#include "pq_defs.h"
#include "pcp_vars.h"

/* compact the group tables from pcp->gspace onwards */

void compact(struct pcp_vars *pcp)
{
   register int *y = y_address;

   register int i;
   register int j;
   register int p1;
   register int new_address;
   register int bound;

   new_address = pcp->gspace - 1;
   i = pcp->gspace;

#ifndef DEBUG
   if (pcp->fullop || pcp->diagn)
#endif
      text(2, pcp->lused, pcp->structure, 0, 0);

   while (i < pcp->lused) {

      /* the next block is currently allocated */
      if (y[i] > 0) {
         p1 = y[i];
         ++new_address;
         y[p1] = -new_address;
         y[new_address] = y[i];
         bound = y[i + 1] + 1;
         for (j = 1; j <= bound; ++j)
            y[++new_address] = y[++i];
         ++i;
      } else if (y[i] == 0)
         /* this block is currently deallocated */
         i += y[i + 1] + 2;
      else
         /* this block consists only of the header block of length 1 */
         ++i;
   }

   pcp->lused = new_address;

#ifndef DEBUG
   if (pcp->fullop || pcp->diagn)
#endif
      PRINT("After compaction Lused = %d\n", pcp->lused);

   return;
}

Messung V0.5
C=92 H=98 G=94

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge