24 1, 3, 5, 11, 17, 37, 67, 131, 257, 521,
25 1031, 2053, 4099, 8209, 16411, 32771, 65537, 131101, 262147, 524309,
26 1048583, 2097169, 4194319, 8388617, 16777259, 33554467, 67108879, 134217757, 268435459,
35 EHash *eh = allocatorIFC->
alloc(allocator,
sizeof(*eh));
54 while (numBuckets--) {
60 freeEntry(entry, userData);
85 while (numBuckets--) {
86 for (entry = oldBuckets[numBuckets]; entry;) {
107 for (; (entry = *prevp); prevp = (
void **)&entry->next) {
108 if (entry->key == key) {
109 *prevp_r = (
void **)prevp;
123 if (entry->
key == key) {
178 return MEM_mallocN(numBytes,
"CCG standard alloc");
210 #ifdef DUMP_RESULT_GRIDS
219 for (i = 0, index = 0; i < ss->
vMap->
curSize; i++) {
221 for (;
v;
v =
v->next, index++) {
223 printf(
"vertex index=%d, co=(%f, %f, %f)\n", index, co[0], co[1], co[2]);
227 for (i = 0, index = 0; i < ss->
eMap->
curSize; i++) {
229 for (;
e;
e =
e->next, index++) {
232 printf(
"edge index=%d, start_co=(%f, %f, %f)\n", index, co[0], co[1], co[2]);
233 for (
x = 0;
x < edgeSize;
x++) {
235 printf(
"edge index=%d, seg=%d, co=(%f, %f, %f)\n", index,
x, co[0], co[1], co[2]);
238 printf(
"edge index=%d, end_co=(%f, %f, %f)\n", index, co[0], co[1], co[2]);
242 for (i = 0, index = 0; i < ss->
fMap->
curSize; i++) {
244 for (; f; f = f->
next, index++) {
248 printf(
"face index=%d, vertex=%d, coord=(%f, %f, %f)\n", index, S, co[0], co[1], co[2]);
253 for (i = 0, index = 0; i < ss->
fMap->
curSize; i++) {
255 for (; f; f = f->
next, index++) {
260 printf(
"face index=%d, edge=%d, coord1=(%f, %f, %f), coord2=(%f, %f, %f)\n",
273 for (i = 0, index = 0; i < ss->
fMap->
curSize; i++) {
275 for (; f; f = f->
next, index++) {
278 for (
x = 0;
x < gridSize;
x++) {
279 for (
y = 0;
y < gridSize;
y++) {
281 printf(
"face index=%d. corner=%d, x=%d, y=%d, coord=(%f, %f, %f)\n",
291 for (
x = 0;
x < gridSize;
x++) {
293 printf(
"face index=%d. corner=%d, ie_index=%d, coord=(%f, %f, %f)\n",
BLI_INLINE int ccg_edgesize(int level)
BLI_INLINE int ccg_gridsize(int level)
BLI_INLINE CCGEdge ** FACE_getEdges(CCGFace *f)
BLI_INLINE CCGVert ** FACE_getVerts(CCGFace *f)
#define EHASH_alloc(eh, nb)
#define EDGE_getCo(e, lvl, x)
#define FACE_getIFCo(f, lvl, S, x, y)
#define EHASH_free(eh, ptr)
#define VERT_getCo(v, lvl)
void(* EHEntryFreeFP)(EHEntry *, void *)
#define EHASH_hash(eh, item)
#define FACE_getIECo(f, lvl, S, x)
void * ccg_ehash_lookupWithPrev(EHash *eh, void *key, void ***prevp_r)
void ccg_ehashIterator_init(EHash *eh, EHashIterator *ehi)
void ccg_ehashIterator_next(EHashIterator *ehi)
void * ccg_ehash_lookup(EHash *eh, void *key)
void ccg_ehash_insert(EHash *eh, EHEntry *entry)
static void * _stdAllocator_alloc(CCGAllocatorHDL UNUSED(a), int numBytes)
EHash * ccg_ehash_new(int estimatedNumEntries, CCGAllocatorIFC *allocatorIFC, CCGAllocatorHDL allocator)
void ccg_ehash_free(EHash *eh, EHEntryFreeFP freeEntry, void *userData)
void * ccg_ehashIterator_getCurrent(EHashIterator *ehi)
int ccg_ehashIterator_isStopped(EHashIterator *ehi)
CCGAllocatorIFC * ccg_getStandardAllocatorIFC(void)
static void _stdAllocator_free(CCGAllocatorHDL UNUSED(a), void *ptr)
static void * _stdAllocator_realloc(CCGAllocatorHDL UNUSED(a), void *ptr, int newSize, int UNUSED(oldSize))
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
Read Guarded memory(de)allocation.
#define MEM_reallocN(vmemh, len)
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
void(* MEM_freeN)(void *vmemh)
void *(* MEM_mallocN)(size_t len, const char *str)
void(* free)(CCGAllocatorHDL a, void *ptr)
void(* release)(CCGAllocatorHDL a)
void *(* realloc)(CCGAllocatorHDL a, void *ptr, int newSize, int oldSize)
void *(* alloc)(CCGAllocatorHDL a, int numBytes)
struct _EHEntry * curEntry
CCGAllocatorIFC allocatorIFC
CCGAllocatorHDL allocator