pfuNewHTable man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



pfuHash(3pf)   OpenGL Performer 3.2.2 libpfutil Reference Pages	  pfuHash(3pf)

NAME
     pfuNewHTable, pfuDelHTable, pfuResetHTable, pfuEnterHash, pfuRemoveHash,
     pfuFindHash, pfuHashGSetVerts, pfuCalcHashSize - Hash table utility
     library.

FUNCTION SPECIFICATION
     #include <Performer/pfutil.h>

     pfuHashTable *   pfuNewHTable(int numb, int eltsize, void* arena);

     void	      pfuDelHTable(pfuHashTable* ht);

     void	      pfuResetHTable(pfuHashTable* ht);

     pfuHashElt *     pfuEnterHash(pfuHashTable* ht, pfuHashElt* elt);

     int	      pfuRemoveHash(pfuHashTable* ht, pfuHashElt* elt);

     int	      pfuFindHash(pfuHashTable* ht, pfuHashElt* elt);

     int	      pfuHashGSetVerts(pfGeoSet *gset);

     int	      pfuCalcHashSize(int size);

	  typedef struct _pfuHashElt
	  {
	      int	 id;
	      int	 listIndex;
	      uint  key;
	      void  *data;
	  } pfuHashElt;

	  typedef struct _pfuHashBucket
	  {
	      int	 nelts;
	      pfuHashElt *elts;
	      struct _pfuHashBucket	*next;

	  } pfuHashBucket;

	  typedef struct _pfuHashTable
	  {
	      void  *arena;
	      int	 eltSize;
	      int	 realeltSize;
	      int	 numBuckets;
	      pfuHashBucket   **buckets;

	      /* Flat list of hash elements provides linear ordering */
	      int	 listCount;
	      int	 listAvail;

									Page 1

pfuHash(3pf)   OpenGL Performer 3.2.2 libpfutil Reference Pages	  pfuHash(3pf)

	      pfuHashElt **list;
	  } pfuHashTable;

DESCRIPTION
     pfuNewHTable returns a new hash table allocated from the shared memory
     arena arena with numb elements each of size eltsize.  eltsize is in bytes
     and must be a multiple of four.

     pfuDelHTable deletes the hash table ht.

     pfuResetHTable resets the hash table ht.

     pfuEnterHash puts element elt into hash table ht.	If the element is
     already in the table, it returns the address of that element, otherwise
     it returns NULL and adds the element to the list member of the
     pfuHashTable structure.

     pfuRemoveHash removes element elt from the hash table ht, returning TRUE
     if elt was found and FALSE otherwise.

     pfuFindHash looks for element elt in hash table ht, returning TRUE if elt
     was found and FALSE otherwise.

     pfuHashGSetVerts takes a pfGeoSet of type PFGS_TRIS and attempts to share
     all PFGS_PER_VERTEX attributes.  pfuHashGSetVerts will convert a non-
     indexed pfGeoSet into an indexed one and may delete the old attribute and
     index arrays and create new ones.	Consequently you may wish to pfRef
     your arrays to avoid their deletion.

     An example of pfuHashGSetVerts usage is found in pfdMeshGSet.

     pfuCalcHashSize returns the smallest prime number larger than size. This
     is useful since hash tables are more memory efficient when their table
     size is prime.

NOTES
     The libpfutil source code, object code and documentation are provided as
     unsupported software.  Routines are subject to change in future releases.

SEE ALSO
     pfGeoSet, pfRef, pfuMeshGSet, pfuEventQueue, pfuGUI

									Page 2

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net