![]() |
Project
|
Per-call cost, memory and the synthetic boolean ladder: the measuring parts of the representation comparison. More...
#include "CADSupport/O2SolidHarness.h"#include "TGeoBBox.h"#include "TGeoBoolNode.h"#include "TGeoCompositeShape.h"#include "TGeoMatrix.h"#include "TGeoShape.h"#include "TGeoTube.h"#include <algorithm>#include <array>#include <chrono>#include <cmath>#include <cstdint>#include <cstdio>#include <cstring>#include <fstream>#include <string>#include <vector>Go to the source code of this file.
Classes | |
| struct | o2::cad::bench::TimingStat |
| struct | o2::cad::bench::MemorySnapshot |
| struct | o2::cad::bench::StructuralMemory |
| struct | o2::cad::bench::QuerySamples |
| struct | o2::cad::bench::detail::Lcg |
| struct | o2::cad::bench::BooleanTreeStats |
| class | o2::cad::bench::BallastShape |
Namespaces | |
| namespace | o2 |
| a couple of static helper functions to create timestamp values for CCDB queries or override obsolete objects | |
| namespace | o2::cad |
| namespace | o2::cad::bench |
| namespace | o2::cad::bench::detail |
Enumerations | |
| enum class | o2::cad::bench::LadderShape { o2::cad::bench::Chain , o2::cad::bench::Balanced } |
Functions | |
| uint64_t | o2::cad::bench::detail::mix (uint64_t acc, double value) |
| template<typename Pass > | |
| TimingStat | o2::cad::bench::timePasses (long long callsPerPass, int warmupPasses, int passes, Pass &&pass) |
| MemorySnapshot | o2::cad::bench::readMemory () |
| MemorySnapshot | o2::cad::bench::operator- (const MemorySnapshot &a, const MemorySnapshot &b) |
| long long | o2::cad::bench::fileBytes (const std::string &path) |
| QuerySamples | o2::cad::bench::buildQuerySamples (const TGeoShape *reference, const std::string &referenceName, const Point3D &bboxMin, const Point3D &bboxMax, int nPoints, int nRays, uint64_t seed=20260802ULL, double inflate=0.12) |
| TimingStat | o2::cad::bench::timeContainsPass (const TGeoShape *shape, const QuerySamples &s, int warmup, int passes) |
| TimingStat | o2::cad::bench::timeSafetyPass (const TGeoShape *shape, const QuerySamples &s, int warmup, int passes) |
| TimingStat | o2::cad::bench::timeDistOutPass (const TGeoShape *shape, const QuerySamples &s, int warmup, int passes) |
| TimingStat | o2::cad::bench::timeDistInPass (const TGeoShape *shape, const QuerySamples &s, int warmup, int passes) |
| TGeoShape * | o2::cad::bench::buildBooleanLadder (int leaves, LadderShape shape, const std::string &tag) |
| BooleanTreeStats | o2::cad::bench::booleanTreeStats (const TGeoShape *shape) |
Per-call cost, memory and the synthetic boolean ladder: the measuring parts of the representation comparison.
Header-only, and deliberately NOT in CADSupport, for the same reason XRayTransport.h is not: an instrument must not change the thing it measures. Nothing in the gate path or in libO2CADSupport is rebuilt differently because this file exists.
It is a header rather than code inside runXRayBenchmark.cxx so that the unit tests exercise THE SAME timing loop, THE SAME memory probe and THE SAME ladder the benchmark reports from. A test written against a second implementation of the same idea tests neither.
THREE THINGS THIS FILE IS CAREFUL ABOUT, each bought with a known way of getting it wrong:
Definition in file RepresentationBench.h.