forked from bartvdbraak/blender
Support WITH_CXX_GUARDEDALLOC for dualcon library
This commit is contained in:
parent
d2dbc0b85e
commit
35db9c5e70
@ -23,6 +23,10 @@
|
||||
#ifndef __DUALCON_H__
|
||||
#define __DUALCON_H__
|
||||
|
||||
#ifdef WITH_CXX_GUARDEDALLOC
|
||||
# include "MEM_guardedalloc.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -20,8 +20,8 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#ifndef GEOCOMMON_H
|
||||
#define GEOCOMMON_H
|
||||
#ifndef __GEOCOMMON_H__
|
||||
#define __GEOCOMMON_H__
|
||||
|
||||
#define UCHAR unsigned char
|
||||
#define USHORT unsigned short
|
||||
@ -61,4 +61,4 @@ typedef struct {
|
||||
} BoundingBoxf;
|
||||
|
||||
|
||||
#endif
|
||||
#endif /* __GEOCOMMON_H__ */
|
||||
|
@ -20,8 +20,8 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#ifndef MEMORYALLOCATOR_H
|
||||
#define MEMORYALLOCATOR_H
|
||||
#ifndef __MEMORYALLOCATOR_H__
|
||||
#define __MEMORYALLOCATOR_H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -53,6 +53,11 @@ virtual void printInfo( ) = 0;
|
||||
virtual int getAllocated( ) = 0;
|
||||
virtual int getAll( ) = 0;
|
||||
virtual int getBytes( ) = 0;
|
||||
|
||||
#ifdef WITH_CXX_GUARDEDALLOC
|
||||
MEM_CXX_CLASS_ALLOC_FUNCS("DUALCON:VirtualMemoryAllocator")
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
@ -216,6 +221,11 @@ int getBytes( )
|
||||
{
|
||||
return N;
|
||||
};
|
||||
|
||||
#ifdef WITH_CXX_GUARDEDALLOC
|
||||
MEM_CXX_CLASS_ALLOC_FUNCS("DUALCON:MemoryAllocator")
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif /* __MEMORYALLOCATOR_H__ */
|
||||
|
@ -20,8 +20,8 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#ifndef MODELREADER_H
|
||||
#define MODELREADER_H
|
||||
#ifndef __MODELREADER_H__
|
||||
#define __MODELREADER_H__
|
||||
|
||||
#include "GeoCommon.h"
|
||||
|
||||
@ -59,7 +59,11 @@ virtual int getNumVertices( ) = 0;
|
||||
virtual void getNextVertex(float v[3]) = 0;
|
||||
|
||||
virtual void printInfo( ) = 0;
|
||||
|
||||
#ifdef WITH_CXX_GUARDEDALLOC
|
||||
MEM_CXX_CLASS_ALLOC_FUNCS("DUALCON:ModelReader")
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
#endif /* __MODELREADER_H__ */
|
||||
|
@ -20,6 +20,10 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#ifdef WITH_CXX_GUARDEDALLOC
|
||||
# include "MEM_guardedalloc.h"
|
||||
#endif
|
||||
|
||||
#include <math.h>
|
||||
#include "Projections.h"
|
||||
|
||||
|
@ -20,8 +20,8 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#ifndef PROJECTIONS_H
|
||||
#define PROJECTIONS_H
|
||||
#ifndef __PROJECTIONS_H__
|
||||
#define __PROJECTIONS_H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -125,6 +125,11 @@ public:
|
||||
int isIntersectingPrimary(int edgeInd) const;
|
||||
|
||||
float getIntersectionPrimary(int edgeInd) const;
|
||||
|
||||
#ifdef WITH_CXX_GUARDEDALLOC
|
||||
MEM_CXX_CLASS_ALLOC_FUNCS("DUALCON:CubeTriangleIsect")
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif /* __PROJECTIONS_H__ */
|
||||
|
@ -20,8 +20,8 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#ifndef QUEUE_H
|
||||
#define QUEUE_H
|
||||
#ifndef __QUEUE_H__
|
||||
#define __QUEUE_H__
|
||||
|
||||
struct gridQueueEle {
|
||||
int x, y, z;
|
||||
@ -99,10 +99,10 @@ int popQueue(int st[3], int& dir)
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef WITH_CXX_GUARDEDALLOC
|
||||
MEM_CXX_CLASS_ALLOC_FUNCS("DUALCON:GridQueue")
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
#endif /* __QUEUE_H__ */
|
||||
|
@ -20,8 +20,8 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#ifndef CUBES_H
|
||||
#define CUBES_H
|
||||
#ifndef __CUBES_H__
|
||||
#define __CUBES_H__
|
||||
|
||||
#include "marching_cubes_table.h"
|
||||
|
||||
@ -41,6 +41,11 @@ void getTriangle(int mask, int index, int indices[3])
|
||||
for (int i = 0; i < 3; i++)
|
||||
indices[i] = marching_cubes_tris[mask][index][i];
|
||||
}
|
||||
|
||||
#ifdef WITH_CXX_GUARDEDALLOC
|
||||
MEM_CXX_CLASS_ALLOC_FUNCS("DUALCON:Cubes")
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif /* __CUBES_H__ */
|
||||
|
@ -185,6 +185,11 @@ void printInfo() {
|
||||
int getMemory() {
|
||||
return sizeof(DualConInputReader);
|
||||
}
|
||||
|
||||
#ifdef WITH_CXX_GUARDEDALLOC
|
||||
MEM_CXX_CLASS_ALLOC_FUNCS("DUALCON:DualConInputReader")
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
void *dualcon(const DualConInput *input_mesh,
|
||||
|
@ -20,8 +20,8 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#ifndef MANIFOLD_TABLE_H
|
||||
#define MANIFOLD_TABLE_H
|
||||
#ifndef __MANIFOLD_TABLE_H__
|
||||
#define __MANIFOLD_TABLE_H__
|
||||
|
||||
typedef struct {
|
||||
int comps;
|
||||
@ -30,4 +30,4 @@ typedef struct {
|
||||
|
||||
extern const ManifoldIndices manifold_table[256];
|
||||
|
||||
#endif
|
||||
#endif /* __MANIFOLD_TABLE_H__ */
|
||||
|
@ -20,8 +20,8 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#ifndef MARCHING_CUBES_TABLE_H
|
||||
#define MARCHING_CUBES_TABLE_H
|
||||
#ifndef __MARCHING_CUBES_TABLE_H__
|
||||
#define __MARCHING_CUBES_TABLE_H__
|
||||
|
||||
/* number of configurations */
|
||||
#define TOTCONF 256
|
||||
|
@ -20,6 +20,10 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#ifdef WITH_CXX_GUARDEDALLOC
|
||||
# include "MEM_guardedalloc.h"
|
||||
#endif
|
||||
|
||||
#include "octree.h"
|
||||
#include <Eigen/Dense>
|
||||
#include <limits>
|
||||
|
@ -20,8 +20,8 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#ifndef OCTREE_H
|
||||
#define OCTREE_H
|
||||
#ifndef __OCTREE_H__
|
||||
#define __OCTREE_H__
|
||||
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
@ -1388,6 +1388,10 @@ class Octree
|
||||
removeInternal(num - 1, par);
|
||||
return npar;
|
||||
}
|
||||
|
||||
#ifdef WITH_CXX_GUARDEDALLOC
|
||||
MEM_CXX_CLASS_ALLOC_FUNCS("DUALCON:Octree")
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif /* __OCTREE_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user