Blender V4.3
CCGSubSurf_util.cc File Reference
#include <cmath>
#include <cstdlib>
#include <cstring>
#include "BLI_sys_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_utildefines.h"
#include "CCGSubSurf.h"
#include "CCGSubSurf_intern.h"

Go to the source code of this file.

Functions

Generic Hash Functions
EHashccg_ehash_new (int estimatedNumEntries, CCGAllocatorIFC *allocatorIFC, CCGAllocatorHDL allocator)
 
void ccg_ehash_free (EHash *eh, EHEntryFreeFP freeEntry, void *user_data)
 
void ccg_ehash_insert (EHash *eh, EHEntry *entry)
 
void * ccg_ehash_lookupWithPrev (EHash *eh, void *key, void ***prevp_r)
 
void * ccg_ehash_lookup (EHash *eh, void *key)
 
Hash Elements Iteration
void ccg_ehashIterator_init (EHash *eh, EHashIterator *ehi)
 
void * ccg_ehashIterator_getCurrent (EHashIterator *ehi)
 
void ccg_ehashIterator_next (EHashIterator *ehi)
 
int ccg_ehashIterator_isStopped (EHashIterator *ehi)
 
Standard allocator implementation
static void * _stdAllocator_alloc (CCGAllocatorHDL, int numBytes)
 
static void * _stdAllocator_realloc (CCGAllocatorHDL, void *ptr, int newSize, int)
 
static void _stdAllocator_free (CCGAllocatorHDL, void *ptr)
 
CCGAllocatorIFCccg_getStandardAllocatorIFC ()
 

Variables

static int kHashSizes []
 

Function Documentation

◆ _stdAllocator_alloc()

static void * _stdAllocator_alloc ( CCGAllocatorHDL ,
int numBytes )
static

Definition at line 186 of file CCGSubSurf_util.cc.

References MEM_mallocN.

Referenced by ccg_getStandardAllocatorIFC().

◆ _stdAllocator_free()

static void _stdAllocator_free ( CCGAllocatorHDL ,
void * ptr )
static

Definition at line 196 of file CCGSubSurf_util.cc.

References MEM_freeN(), and ptr.

Referenced by ccg_getStandardAllocatorIFC().

◆ _stdAllocator_realloc()

static void * _stdAllocator_realloc ( CCGAllocatorHDL ,
void * ptr,
int newSize,
int  )
static

Definition at line 191 of file CCGSubSurf_util.cc.

References MEM_reallocN, and ptr.

Referenced by ccg_getStandardAllocatorIFC().

◆ ccg_ehash_free()

void ccg_ehash_free ( EHash * eh,
EHEntryFreeFP freeEntry,
void * user_data )

◆ ccg_ehash_insert()

◆ ccg_ehash_lookup()

void * ccg_ehash_lookup ( EHash * eh,
void * key )

◆ ccg_ehash_lookupWithPrev()

void * ccg_ehash_lookupWithPrev ( EHash * eh,
void * key,
void *** prevp_r )

◆ ccg_ehash_new()

◆ ccg_ehashIterator_getCurrent()

void * ccg_ehashIterator_getCurrent ( EHashIterator * ehi)

◆ ccg_ehashIterator_init()

◆ ccg_ehashIterator_isStopped()

int ccg_ehashIterator_isStopped ( EHashIterator * ehi)

◆ ccg_ehashIterator_next()

◆ ccg_getStandardAllocatorIFC()

CCGAllocatorIFC * ccg_getStandardAllocatorIFC ( void )

Variable Documentation

◆ kHashSizes

int kHashSizes[]
static
Initial value:
= {
1, 3, 5, 11, 17, 37, 67, 131, 257, 521,
1031, 2053, 4099, 8209, 16411, 32771, 65537, 131101, 262147, 524309,
1048583, 2097169, 4194319, 8388617, 16777259, 33554467, 67108879, 134217757, 268435459,
}

Hash implementation.

Definition at line 25 of file CCGSubSurf_util.cc.

Referenced by ccg_ehash_insert(), and ccg_ehash_new().