30 return "sort_topo_rand";
37 for (
int i = kNumElements-1;
i > 0; --
i) {
38 int numEdges = fRand.
nextU() % (kMaxEdges+1);
40 for (
int j = 0; j < numEdges; ++j) {
41 int dep = fRand.
nextU() %
i;
43 fGraph[
i]->dependsOn(fGraph[dep].
get());
49 for (
int i = 0;
i < loops; ++
i) {
50 for (
int j = 0; j < fGraph.
size(); ++j) {
56 SkDEBUGCODE(
bool actualResult =) GrTTopoSort<ToolUtils::TopoTestNode>(fGraph);
60 for (
int j = 0; j < fGraph.
size(); ++j) {
68 static const int kNumElements = 1000;
69 static const int kMaxEdges = 5;
#define check(reporter, ref, unref, make, kill)
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
~TopoSortBench() override
bool isSuitableFor(Backend backend) override
void onDraw(int loops, SkCanvas *) override
const char * onGetName() override
void onDelayedSetup() override
const myers::Point & get(const myers::Segment &)