summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-exegesis/lib/Clustering.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/Clustering.h')
-rw-r--r--llvm/tools/llvm-exegesis/lib/Clustering.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/Clustering.h b/llvm/tools/llvm-exegesis/lib/Clustering.h
index aa4ef67133e..6b8f5a654d9 100644
--- a/llvm/tools/llvm-exegesis/lib/Clustering.h
+++ b/llvm/tools/llvm-exegesis/lib/Clustering.h
@@ -72,6 +72,8 @@ public:
return ClusterIdForPoint_[P];
}
+ const std::vector<InstructionBenchmark> &getPoints() const { return Points_; }
+
const Cluster &getCluster(ClusterId Id) const {
assert(!Id.isUndef() && "unlabeled cluster");
if (Id.isNoise()) {
@@ -86,10 +88,11 @@ public:
const std::vector<Cluster> &getValidClusters() const { return Clusters_; }
private:
- InstructionBenchmarkClustering();
- llvm::Error validateAndSetup(const std::vector<InstructionBenchmark> &Points);
- void dbScan(const std::vector<InstructionBenchmark> &Points, size_t MinPts,
- double EpsilonSquared);
+ InstructionBenchmarkClustering(
+ const std::vector<InstructionBenchmark> &Points);
+ llvm::Error validateAndSetup();
+ void dbScan(size_t MinPts, double EpsilonSquared);
+ const std::vector<InstructionBenchmark> &Points_;
int NumDimensions_ = 0;
// ClusterForPoint_[P] is the cluster id for Points[P].
std::vector<ClusterId> ClusterIdForPoint_;
OpenPOWER on IntegriCloud