Macros | Typedefs | Enumerations | Functions | Variables
testqset.c File Reference
#include "libqhull/user.h"
#include "libqhull/qset.h"
#include "libqhull/mem.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for testqset.c:

Go to the source code of this file.

Macros

#define fmax_(a, b)   ( ( a ) < ( b ) ? ( b ) : ( a ) )
 
#define FOREACHint4_(ints)   FOREACHsetelement_( i2T, ints, i4)
 
#define FOREACHint_(ints)   FOREACHsetelement_( i2T, ints, i2)
 
#define FOREACHint_i_(ints)   FOREACHsetelement_i_( i2T, ints, i2)
 
#define FOREACHintreverse12_(ints)   FOREACHsetelementreverse12_( i2T, ints, i2)
 
#define FOREACHintreverse_(ints)   FOREACHsetelementreverse_( i2T, ints, i2)
 
#define MAXerrorCount   100 /* quit after n errors */
 
#define qh_MEMalign   ((int)(fmax_(sizeof(realT), sizeof(void *))))
 
#define qh_MEMbufsize   0x10000 /* allocate 64K memory buffers */
 
#define qh_MEMinitbuf   0x20000 /* initially allocate 128K buffer */
 
#define realT   double
 

Typedefs

typedef int i2T
 

Enumerations

enum  { MAXint = 0x7fffffff }
 

Functions

void checkSetContents (const char *name, setT *set, int count, int rangeA, int rangeB, int rangeC)
 
int log_i (setT *set, const char *s, int i, int numInts, int checkEvery)
 
int main (int argc, char **argv)
 
void qh_errexit (int exitcode, void *f, void *r)
 
void qh_exit (int exitcode)
 
void qh_fprintf (FILE *fp, int msgcode, const char *fmt,...)
 
void qh_fprintf_stderr (int msgcode, const char *fmt,...)
 
void qh_free (void *mem)
 
void * qh_malloc (size_t size)
 
void readOptions (int argc, char **argv, const char *promptstr, int *numInts, int *checkEvery, int *traceLevel)
 
void setupMemory (int tracelevel, int numInts, int **intarray)
 
void testSetappendSet (int numInts, int *intarray, int checkEvery)
 
void testSetappendSettruncate (int numInts, int *intarray, int checkEvery)
 
void testSetcompactCopy (int numInts, int *intarray, int checkEvery)
 
void testSetdelSetadd (int numInts, int *intarray, int checkEvery)
 
void testSetdelsortedEtc (int numInts, int *intarray, int checkEvery)
 
void testSetequalInEtc (int numInts, int *intarray, int checkEvery)
 
void testSetlastEtc (int numInts, int *intarray, int checkEvery)
 
void testSettemp (int numInts, int *intarray, int checkEvery)
 

Variables

int error_count = 0
 
char prompt []
 

Macro Definition Documentation

◆ fmax_

#define fmax_ (   a,
 
)    ( ( a ) < ( b ) ? ( b ) : ( a ) )

Definition at line 112 of file testqset.c.

◆ FOREACHint4_

#define FOREACHint4_ (   ints)    FOREACHsetelement_( i2T, ints, i4)

Definition at line 87 of file testqset.c.

◆ FOREACHint_

#define FOREACHint_ (   ints)    FOREACHsetelement_( i2T, ints, i2)

Definition at line 86 of file testqset.c.

◆ FOREACHint_i_

#define FOREACHint_i_ (   ints)    FOREACHsetelement_i_( i2T, ints, i2)

Definition at line 88 of file testqset.c.

◆ FOREACHintreverse12_

#define FOREACHintreverse12_ (   ints)    FOREACHsetelementreverse12_( i2T, ints, i2)

Definition at line 90 of file testqset.c.

◆ FOREACHintreverse_

#define FOREACHintreverse_ (   ints)    FOREACHsetelementreverse_( i2T, ints, i2)

Definition at line 89 of file testqset.c.

◆ MAXerrorCount

#define MAXerrorCount   100 /* quit after n errors */

Definition at line 84 of file testqset.c.

◆ qh_MEMalign

#define qh_MEMalign   ((int)(fmax_(sizeof(realT), sizeof(void *))))

Definition at line 117 of file testqset.c.

◆ qh_MEMbufsize

#define qh_MEMbufsize   0x10000 /* allocate 64K memory buffers */

Definition at line 118 of file testqset.c.

◆ qh_MEMinitbuf

#define qh_MEMinitbuf   0x20000 /* initially allocate 128K buffer */

Definition at line 119 of file testqset.c.

◆ realT

#define realT   double

Definition at line 116 of file testqset.c.

Typedef Documentation

◆ i2T

typedef int i2T

Definition at line 83 of file testqset.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
MAXint 

Definition at line 92 of file testqset.c.

Function Documentation

◆ checkSetContents()

void checkSetContents ( const char *  name,
setT set,
int  count,
int  rangeA,
int  rangeB,
int  rangeC 
)

Definition at line 768 of file testqset.c.

◆ log_i()

int log_i ( setT set,
const char *  s,
int  i,
int  numInts,
int  checkEvery 
)

Definition at line 725 of file testqset.c.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 189 of file testqset.c.

◆ qh_errexit()

void qh_errexit ( int  exitcode,
void *  f,
void *  r 
)

Definition at line 133 of file testqset.c.

◆ qh_exit()

void qh_exit ( int  exitcode)

Definition at line 38 of file usermem.c.

◆ qh_fprintf()

void qh_fprintf ( FILE *  fp,
int  msgcode,
const char *  fmt,
  ... 
)

Definition at line 142 of file testqset.c.

◆ qh_fprintf_stderr()

void qh_fprintf_stderr ( int  msgcode,
const char *  fmt,
  ... 
)

Definition at line 57 of file usermem.c.

◆ qh_free()

void qh_free ( void *  mem)

Definition at line 77 of file usermem.c.

◆ qh_malloc()

void* qh_malloc ( size_t  size)

Definition at line 90 of file usermem.c.

◆ readOptions()

void readOptions ( int  argc,
char **  argv,
const char *  promptstr,
int *  numInts,
int *  checkEvery,
int *  traceLevel 
)

Definition at line 230 of file testqset.c.

◆ setupMemory()

void setupMemory ( int  tracelevel,
int  numInts,
int **  intarray 
)

Definition at line 279 of file testqset.c.

◆ testSetappendSet()

void testSetappendSet ( int  numInts,
int *  intarray,
int  checkEvery 
)

Definition at line 381 of file testqset.c.

◆ testSetappendSettruncate()

void testSetappendSettruncate ( int  numInts,
int *  intarray,
int  checkEvery 
)

Definition at line 306 of file testqset.c.

◆ testSetcompactCopy()

void testSetcompactCopy ( int  numInts,
int *  intarray,
int  checkEvery 
)

Definition at line 419 of file testqset.c.

◆ testSetdelSetadd()

void testSetdelSetadd ( int  numInts,
int *  intarray,
int  checkEvery 
)

Definition at line 354 of file testqset.c.

◆ testSetdelsortedEtc()

void testSetdelsortedEtc ( int  numInts,
int *  intarray,
int  checkEvery 
)

Definition at line 448 of file testqset.c.

◆ testSetequalInEtc()

void testSetequalInEtc ( int  numInts,
int *  intarray,
int  checkEvery 
)

Definition at line 503 of file testqset.c.

◆ testSetlastEtc()

void testSetlastEtc ( int  numInts,
int *  intarray,
int  checkEvery 
)

Definition at line 613 of file testqset.c.

◆ testSettemp()

void testSettemp ( int  numInts,
int *  intarray,
int  checkEvery 
)

Definition at line 683 of file testqset.c.

Variable Documentation

◆ error_count

int error_count = 0

Definition at line 109 of file testqset.c.

◆ prompt

char prompt[]
Initial value:
= "testqset N [M] [T5] -- Test qset.c and mem.c\n\
\n\
If this test fails then qhull will not work.\n\
\n\
Test qsets of 0..N integers with a check every M iterations (default ~log10)\n\
Additional checking and logging if M is 1\n\
\n\
T5 turns on memory logging (qset does not log)\n\
\n\
For example:\n\
testqset 10000\n\
"

Definition at line 96 of file testqset.c.



hpp-fcl
Author(s):
autogenerated on Fri Jan 26 2024 03:46:16