MCPcopy Create free account
hub / github.com/boostorg/histogram / process

Function process

examples/guide_mixed_cpp_python.cpp:10–13  ·  view source on GitHub ↗

function that runs in C++ and accepts reference to dynamic histogram

Source from the content-addressed store, hash-verified

8
9// function that runs in C++ and accepts reference to dynamic histogram
10void process(bh::histogram<>& h) {
11 // fill histogram, in reality this would be arbitrarily complex code
12 for (int i = 0; i < 4; ++i) h(0.25 * i, i);
13}
14
15// a minimal Python module, which exposes the process function to Python
16BOOST_PYTHON_MODULE(cpp_filler) { bp::def("process", process); }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected