MCPcopy Create free account
hub / github.com/apache/impala / TestImpalaNullTerminated

Function TestImpalaNullTerminated

be/src/benchmarks/string-search-benchmark.cc:82–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void TestImpalaNullTerminated(int batch_size, void* d) {
83 TestData* data = reinterpret_cast<TestData*>(d);
84 for (int i = 0; i < batch_size; ++i) {
85 data->matches = 0;
86 for (int n = 0; n < data->needles.size(); ++n) {
87 // Exercise the null-terminated path.
88 StringSearchSSE needle(data->needles[n].Ptr());
89 for (int iters = 0; iters < 10; ++iters) {
90 for (int h = 0; h < data->haystacks.size(); ++h) {
91 if (needle.Search(data->haystacks[h]) != -1) {
92 ++data->matches;
93 }
94 }
95 }
96 }
97 }
98}
99
100void TestImpalaNonNullTerminated(int batch_size, void* d) {
101 TestData* data = reinterpret_cast<TestData*>(d);

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
PtrMethod · 0.45
SearchMethod · 0.45

Tested by

no test coverage detected