Skip to content
Snippets Groups Projects
Commit 46901577 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix build

parent 1f8bb29c
No related branches found
No related tags found
No related merge requests found
...@@ -593,10 +593,10 @@ void delaunayTrgl (const unsigned int numThreads, ...@@ -593,10 +593,10 @@ void delaunayTrgl (const unsigned int numThreads,
{ {
double totSearch=0; double totSearch=0;
double totCavity=0; double totCavity=0;
cavityContainer cavity[NPTS_AT_ONCE]; std::vector<cavityContainer> cavity(NPTS_AT_ONCE);
connContainer bnd[NPTS_AT_ONCE]; std::vector<connContainer> bnd(NPTS_AT_ONCE);
connContainer faceToTet; connContainer faceToTet;
Tet* Choice[NPTS_AT_ONCE]; std::vector<Tet*> Choice(NPTS_AT_ONCE);
for (unsigned int K=0;K<NPTS_AT_ONCE;K++)Choice[K] = T[0]; for (unsigned int K=0;K<NPTS_AT_ONCE;K++)Choice[K] = T[0];
#ifdef _OPENMP #ifdef _OPENMP
...@@ -607,8 +607,8 @@ void delaunayTrgl (const unsigned int numThreads, ...@@ -607,8 +607,8 @@ void delaunayTrgl (const unsigned int numThreads,
invalidCavities [myThread] = 0; invalidCavities [myThread] = 0;
unsigned int locSize=0; unsigned int locSize=0;
unsigned int locSizeK[NPTS_AT_ONCE]; std::vector<unsigned int> locSizeK(NPTS_AT_ONCE);
Vertex *allocatedVerts [NPTS_AT_ONCE]; std::vector<Vertex*> allocatedVerts(NPTS_AT_ONCE);
for (unsigned int K=0;K<NPTS_AT_ONCE;K++){ for (unsigned int K=0;K<NPTS_AT_ONCE;K++){
locSizeK[K] = assignTo[K+myThread*NPTS_AT_ONCE].size(); locSizeK[K] = assignTo[K+myThread*NPTS_AT_ONCE].size();
locSize += locSizeK[K]; locSize += locSizeK[K];
...@@ -631,7 +631,7 @@ void delaunayTrgl (const unsigned int numThreads, ...@@ -631,7 +631,7 @@ void delaunayTrgl (const unsigned int numThreads,
#endif #endif
int newCounter = 0; int newCounter = 0;
Vertex *vToAdd[NPTS_AT_ONCE]; std::vector<Vertex*> vToAdd(NPTS_AT_ONCE);
#pragma omp barrier #pragma omp barrier
//////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////
...@@ -641,7 +641,7 @@ void delaunayTrgl (const unsigned int numThreads, ...@@ -641,7 +641,7 @@ void delaunayTrgl (const unsigned int numThreads,
for (unsigned int iPGlob=0 ; iPGlob < maxLocSizeK; iPGlob++){ for (unsigned int iPGlob=0 ; iPGlob < maxLocSizeK; iPGlob++){
#pragma omp barrier #pragma omp barrier
cavitySize[myThread] = 0; cavitySize[myThread] = 0;
Tet *t [NPTS_AT_ONCE]; std::vector<Tet*> t(NPTS_AT_ONCE);
// clock_t c1 = clock(); // clock_t c1 = clock();
for (unsigned int K=0; K< NPTS_AT_ONCE; K++) { for (unsigned int K=0; K< NPTS_AT_ONCE; K++) {
vToAdd[K] = iPGlob < locSizeK[K] ? &allocatedVerts[K][iPGlob] : NULL; vToAdd[K] = iPGlob < locSizeK[K] ? &allocatedVerts[K][iPGlob] : NULL;
...@@ -713,7 +713,7 @@ void delaunayTrgl (const unsigned int numThreads, ...@@ -713,7 +713,7 @@ void delaunayTrgl (const unsigned int numThreads,
#pragma omp barrier #pragma omp barrier
bool ok[ NPTS_AT_ONCE]; std::vector<bool> ok(NPTS_AT_ONCE);
for (unsigned int K=0; K< NPTS_AT_ONCE; K++) { for (unsigned int K=0; K< NPTS_AT_ONCE; K++) {
if (!vToAdd[K])ok[K]=false; if (!vToAdd[K])ok[K]=false;
else ok[K] = canWeProcessCavity (cavity[K], myThread, K); else ok[K] = canWeProcessCavity (cavity[K], myThread, K);
...@@ -888,7 +888,7 @@ void delaunayTriangulation (const int numThreads, ...@@ -888,7 +888,7 @@ void delaunayTriangulation (const int numThreads,
std::vector<Vertex*> assignTo0[1]; std::vector<Vertex*> assignTo0[1];
std::vector<Vertex*> assignTo [nbBlocks]; std::vector<std::vector<Vertex*> > assignTo(nbBlocks);
for (unsigned int i=1;i<indices.size();i++){ for (unsigned int i=1;i<indices.size();i++){
int start = indices[i-1]; int start = indices[i-1];
...@@ -920,7 +920,7 @@ void delaunayTriangulation (const int numThreads, ...@@ -920,7 +920,7 @@ void delaunayTriangulation (const int numThreads,
// double _t1 = walltime(&_t); // double _t1 = walltime(&_t);
delaunayTrgl(1,1, assignTo0[0].size(),T,assignTo0); delaunayTrgl(1,1, assignTo0[0].size(),T,assignTo0);
// print ("initialTetrahedrization.pos",T); // print ("initialTetrahedrization.pos",T);
delaunayTrgl(numThreads,nptsatonce, N,T,assignTo); delaunayTrgl(numThreads,nptsatonce, N,T,&assignTo[0]);
// _t = 0; // _t = 0;
// double _t2 = walltime(&_t); // double _t2 = walltime(&_t);
// printf("WALL CLOCK TIME %12.5E\n",_t2-_t1); // printf("WALL CLOCK TIME %12.5E\n",_t2-_t1);
...@@ -997,5 +997,3 @@ void delaunayTriangulation (const int numThreads, ...@@ -997,5 +997,3 @@ void delaunayTriangulation (const int numThreads,
for (unsigned int i=0;i<_vertices.size();i++)delete _vertices[i]; for (unsigned int i=0;i<_vertices.size();i++)delete _vertices[i];
for (unsigned int i=0;i<_tets.size();i++)delete _tets[i]; for (unsigned int i=0;i<_tets.size();i++)delete _tets[i];
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment