[geos-commits] [SCM] GEOS branch main-relate-ng updated. fc3621df2e5dfe01861b0ab1c98d54e3beb77f5f
git at osgeo.org
git at osgeo.org
Thu Aug 8 14:39:57 PDT 2024
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GEOS".
The branch, main-relate-ng has been updated
via fc3621df2e5dfe01861b0ab1c98d54e3beb77f5f (commit)
from 852381011dd5c778b4fa0e4460807a8dc8a729e7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit fc3621df2e5dfe01861b0ab1c98d54e3beb77f5f
Author: Martin Davis <mtnclimb at gmail.com>
Date: Thu Aug 8 14:39:38 2024 -0700
Refine TopologyPredicatePerfTest
diff --git a/benchmarks/geom/TopologyPredicatePerfTest.cpp b/benchmarks/geom/TopologyPredicatePerfTest.cpp
index 571bcbc70..05c9ae694 100644
--- a/benchmarks/geom/TopologyPredicatePerfTest.cpp
+++ b/benchmarks/geom/TopologyPredicatePerfTest.cpp
@@ -27,7 +27,7 @@ std::size_t NUM_LINES_PTS = 100;
#define COVERS 2
#define TOUCHES 3
-std::string op{"intersects"};
+std::string predicateName{"intersects"};
int predicateOp = INTERSECTS;
int testRelateOpIntersects(const Geometry& g, const std::vector<std::unique_ptr<Geometry>>& geoms) {
@@ -180,7 +180,7 @@ double test(const Geometry& g, const std::vector<std::unique_ptr<Geometry>>& geo
<< MAX_ITER * geoms.size() << ","
<< count << "," << geoms[0]->getGeometryType() << ","
<< geoms[0]->getNumPoints() << ","
- << method << ","
+ << method << " - " << predicateName << ","
<< tot << ",";
std::cout << std::fixed << std::setprecision(1);
std::cout << timesFaster
@@ -206,27 +206,27 @@ void test(int dim, std::size_t npts) {
double baseTime;
switch (predicateOp) {
case INTERSECTS:
- baseTime = test(*target, geoms, "RelateOp-intersects", testRelateOpIntersects, 0);
- test(*target, geoms, "Geometry-intersects", testGeometryIntersects, baseTime);
- test(*target, geoms, "PreparedGeom-intersects", testPrepGeomIntersects, baseTime);
- test(*target, geoms, "RelateNGPrepared-intersects", testRelateNGPreparedIntersects, baseTime);
+ baseTime = test(*target, geoms, "RelateOp", testRelateOpIntersects, 0);
+ test(*target, geoms, "Geometry", testGeometryIntersects, baseTime);
+ test(*target, geoms, "PreparedGeom", testPrepGeomIntersects, baseTime);
+ test(*target, geoms, "RelateNGPrepared", testRelateNGPreparedIntersects, baseTime);
break;
case CONTAINS:
- baseTime = test(*target, geoms, "RelateOp-contains", testRelateOpIntersects, 0);
- test(*target, geoms, "Geometry-contains", testGeometryIntersects, baseTime);
- test(*target, geoms, "PreparedGeom-contains", testPrepGeomContains, baseTime);
- test(*target, geoms, "RelateNGPrepared-contains", testRelateNGPreparedContains, baseTime);
+ baseTime = test(*target, geoms, "RelateOp", testRelateOpIntersects, 0);
+ test(*target, geoms, "Geometry", testGeometryIntersects, baseTime);
+ test(*target, geoms, "PreparedGeom", testPrepGeomContains, baseTime);
+ test(*target, geoms, "RelateNGPrepared", testRelateNGPreparedContains, baseTime);
break;
case COVERS:
- baseTime = test(*target, geoms, "RelateOp-covers", testRelateOpCovers, 0);
- test(*target, geoms, "Geometry-covers", testGeometryCovers, baseTime);
- test(*target, geoms, "PreparedGeom-covers", testPrepGeomCovers, baseTime);
- test(*target, geoms, "RelateNGPrepared-covers", testRelateNGPreparedCovers, baseTime);
+ baseTime = test(*target, geoms, "RelateOp", testRelateOpCovers, 0);
+ test(*target, geoms, "Geometry", testGeometryCovers, baseTime);
+ test(*target, geoms, "PreparedGeom", testPrepGeomCovers, baseTime);
+ test(*target, geoms, "RelateNGPrepared", testRelateNGPreparedCovers, baseTime);
break;
case TOUCHES:
- baseTime = test(*target, geoms, "RelateOp-touches", testRelateOpTouches, 0);
- test(*target, geoms, "Geometry-touches", testGeometryTouches, baseTime);
- test(*target, geoms, "RelateNGPrepared-touches", testRelateNGPreparedTouches, baseTime);
+ baseTime = test(*target, geoms, "RelateOp", testRelateOpTouches, 0);
+ test(*target, geoms, "Geometry", testGeometryTouches, baseTime);
+ test(*target, geoms, "RelateNGPrepared", testRelateNGPreparedTouches, baseTime);
break;
}
}
@@ -244,18 +244,18 @@ void testAll(int dim)
}
int main(int argc, char** argv) {
- op = "intersects";
+ predicateName = "intersects";
if (argc >= 2) {
- op = argv[1];
+ predicateName = argv[1];
}
predicateOp = INTERSECTS;
- if (op == "contains") {
+ if (predicateName == "contains") {
predicateOp = CONTAINS;
}
- else if (op == "covers") {
+ else if (predicateName == "covers") {
predicateOp = COVERS;
}
- else if (op == "touches") {
+ else if (predicateName == "touches") {
predicateOp = TOUCHES;
}
-----------------------------------------------------------------------
Summary of changes:
benchmarks/geom/TopologyPredicatePerfTest.cpp | 44 +++++++++++++--------------
1 file changed, 22 insertions(+), 22 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list