Blender  V3.3
Functions | Variables
CCGSubSurf_util.c File Reference
#include <math.h>
#include <stdlib.h>
#include <string.h>
#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

EHashccg_ehash_new (int estimatedNumEntries, CCGAllocatorIFC *allocatorIFC, CCGAllocatorHDL allocator)
 
void ccg_ehash_free (EHash *eh, EHEntryFreeFP freeEntry, void *userData)
 
void ccg_ehash_insert (EHash *eh, EHEntry *entry)
 
voidccg_ehash_lookupWithPrev (EHash *eh, void *key, void ***prevp_r)
 
voidccg_ehash_lookup (EHash *eh, void *key)
 
void ccg_ehashIterator_init (EHash *eh, EHashIterator *ehi)
 
voidccg_ehashIterator_getCurrent (EHashIterator *ehi)
 
void ccg_ehashIterator_next (EHashIterator *ehi)
 
int ccg_ehashIterator_isStopped (EHashIterator *ehi)
 
static void_stdAllocator_alloc (CCGAllocatorHDL UNUSED(a), int numBytes)
 
static void_stdAllocator_realloc (CCGAllocatorHDL UNUSED(a), void *ptr, int newSize, int UNUSED(oldSize))
 
static void _stdAllocator_free (CCGAllocatorHDL UNUSED(a), void *ptr)
 
CCGAllocatorIFCccg_getStandardAllocatorIFC (void)
 

Variables

static int kHashSizes []
 

Function Documentation

◆ _stdAllocator_alloc()

static void* _stdAllocator_alloc ( CCGAllocatorHDL   UNUSEDa,
int  numBytes 
)
static

Standard allocator implementation.

Definition at line 176 of file CCGSubSurf_util.c.

References MEM_mallocN.

Referenced by ccg_getStandardAllocatorIFC().

◆ _stdAllocator_free()

static void _stdAllocator_free ( CCGAllocatorHDL   UNUSEDa,
void ptr 
)
static

Definition at line 189 of file CCGSubSurf_util.c.

References MEM_freeN, and ptr.

Referenced by ccg_getStandardAllocatorIFC().

◆ _stdAllocator_realloc()

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

Definition at line 181 of file CCGSubSurf_util.c.

References MEM_reallocN, and ptr.

Referenced by ccg_getStandardAllocatorIFC().

◆ ccg_ehash_free()

void ccg_ehash_free ( EHash eh,
EHEntryFreeFP  freeEntry,
void userData 
)

◆ ccg_ehash_insert()

void ccg_ehash_insert ( EHash eh,
EHEntry entry 
)

◆ 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()

EHash* ccg_ehash_new ( int  estimatedNumEntries,
CCGAllocatorIFC allocatorIFC,
CCGAllocatorHDL  allocator 
)

◆ ccg_ehashIterator_getCurrent()

void* ccg_ehashIterator_getCurrent ( EHashIterator ehi)

◆ ccg_ehashIterator_init()

void ccg_ehashIterator_init ( EHash eh,
EHashIterator ehi 
)

◆ ccg_ehashIterator_isStopped()

int ccg_ehashIterator_isStopped ( EHashIterator ehi)

◆ ccg_ehashIterator_next()

void ccg_ehashIterator_next ( EHashIterator ehi)

◆ 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 23 of file CCGSubSurf_util.c.

Referenced by ccg_ehash_insert(), and ccg_ehash_new().