MCPcopy Create free account
hub / github.com/Kitware/VTK / ClearCPUCache

Function ClearCPUCache

Examples/ImageProcessing/Cxx/ImageBenchmark.cxx:183–188  ·  view source on GitHub ↗

attempt to clear all CPU caches on a multi-CPU machine

Source from the content-addressed store, hash-verified

181
182// attempt to clear all CPU caches on a multi-CPU machine
183static void ClearCPUCache(size_t cacheSize)
184{
185 vtkSmartPointer<vtkMultiThreader> threader = vtkSmartPointer<vtkMultiThreader>::New();
186 threader->SetSingleMethod(ClearOneCPUCache, &cacheSize);
187 threader->SingleMethodExecute();
188}
189
190// verify that everything is set the way that we expect
191static void PrintInfo(vtkThreadedImageAlgorithm* filter, std::ostream& os)

Callers 1

RunBenchmarkFunction · 0.85

Calls 3

NewFunction · 0.50
SetSingleMethodMethod · 0.45
SingleMethodExecuteMethod · 0.45

Tested by

no test coverage detected