diff --git a/sample/simple3DFilter.cpp b/sample/simple3DFilter.cpp index 000c6b7..8683807 100644 --- a/sample/simple3DFilter.cpp +++ b/sample/simple3DFilter.cpp @@ -108,7 +108,7 @@ int main(int argc, char **argv) H5::H5File in_f(fname1, 0); H5::H5File out_f("fields.h5", H5F_ACC_TRUNC); array_type v1_data; - uint32_t N1_points, N2_points; + uint64_t N1_points, N2_points; array3_type bins(boost::extents[Nres][Nres][Nres]); @@ -124,12 +124,12 @@ int main(int argc, char **argv) MyCell *allCells_1 = new MyCell[N1_points]; #pragma omp parallel for schedule(static) - for (long i = 0; i < Nres*Nres*Nres; i++) + for (uint32_t i = 0; i < Nres*Nres*Nres; i++) bins.data()[i] = 0; cout << "Shuffling data in cells..." << endl; #pragma omp parallel for schedule(static) - for (int i = 0 ; i < N1_points; i++) + for (uint64_t i = 0 ; i < N1_points; i++) { for (int j = 0; j < 3; j++) allCells_1[i].coord[j] = v1_data[i][j]; diff --git a/src/mykdtree.hpp b/src/mykdtree.hpp index 1b36eea..6599c33 100644 --- a/src/mykdtree.hpp +++ b/src/mykdtree.hpp @@ -99,8 +99,8 @@ namespace CosmoTool { typename KDDef::CoordType r, r2; KDCell **cells; typename KDDef::CoordType *distances; - uint32_t currentRank; - uint32_t numCells; + uint64_t currentRank; + uint64_t numCells; }; @@ -114,7 +114,7 @@ namespace CosmoTool { RecursionMultipleInfo(const typename KDDef::KDCoordinates& rx, KDCell **cells, - uint32_t numCells) + uint64_t numCells) : queue(cells, numCells, INFINITY),traversed(0) { std::copy(rx, rx+N, x); @@ -153,20 +153,20 @@ namespace CosmoTool { std::copy(replicate, replicate+N, this->replicate); } - uint32_t getIntersection(const coords& x, CoordType r, + uint64_t getIntersection(const coords& x, CoordType r, Cell **cells, - uint32_t numCells); - uint32_t getIntersection(const coords& x, CoordType r, + uint64_t numCells); + uint64_t getIntersection(const coords& x, CoordType r, Cell **cells, CoordType *distances, - uint32_t numCells); - uint32_t countCells(const coords& x, CoordType r); + uint64_t numCells); + uint64_t countCells(const coords& x, CoordType r); Cell *getNearestNeighbour(const coords& x); - void getNearestNeighbours(const coords& x, uint32_t NumCells, + void getNearestNeighbours(const coords& x, uint64_t NumCells, Cell **cells); - void getNearestNeighbours(const coords& x, uint32_t NumCells, + void getNearestNeighbours(const coords& x, uint64_t NumCells, Cell **cells, CoordType *distances); diff --git a/src/mykdtree.tcc b/src/mykdtree.tcc index e3fbdc8..6d555bd 100644 --- a/src/mykdtree.tcc +++ b/src/mykdtree.tcc @@ -80,9 +80,9 @@ namespace CosmoTool { } template - uint32_t KDTree::getIntersection(const coords& x, CoordType r, + uint64_t KDTree::getIntersection(const coords& x, CoordType r, KDTree::Cell **cells, - uint32_t numCells) + uint64_t numCells) { RecursionInfoCells info; @@ -112,10 +112,10 @@ namespace CosmoTool { } template - uint32_t KDTree::getIntersection(const coords& x, CoordType r, + uint64_t KDTree::getIntersection(const coords& x, CoordType r, Cell **cells, CoordType *distances, - uint32_t numCells) + uint64_t numCells) { RecursionInfoCells info; @@ -144,7 +144,7 @@ namespace CosmoTool { } template - uint32_t KDTree::countCells(const coords& x, CoordType r) + uint64_t KDTree::countCells(const coords& x, CoordType r) { RecursionInfoCells info; @@ -501,7 +501,7 @@ namespace CosmoTool { } template - void KDTree::getNearestNeighbours(const coords& x, uint32_t N2, + void KDTree::getNearestNeighbours(const coords& x, uint64_t N2, Cell **cells) { RecursionMultipleInfo info(x, cells, N2); @@ -527,7 +527,7 @@ namespace CosmoTool { } template - void KDTree::getNearestNeighbours(const coords& x, uint32_t N2, + void KDTree::getNearestNeighbours(const coords& x, uint64_t N2, Cell **cells, CoordType *distances) {