Skip to content

Commit

Permalink
Added kwargs version of mcx.
Browse files Browse the repository at this point in the history
  • Loading branch information
matinraayai committed May 2, 2022
1 parent baa5fdd commit f4cd3c3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pymcx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -925,6 +925,11 @@ py::dict pyMcxInterface(const py::dict& userCfg) {
}


py::dict pyMcxInterfaceWargs(py::args args, const py::kwargs& kwargs) {
return pyMcxInterface(kwargs);
}


void printMCXUsage() {
std::cout << "PyMCX v2021.2\nUsage:\n flux, detphoton, vol, seeds = pymcx.mcx(cfg);\n\nRun 'help(pymcx.mcx)' for more details.\n";
}
Expand Down Expand Up @@ -969,8 +974,8 @@ py::list getGPUInfo() {

PYBIND11_MODULE(pymcx, m) {
m.doc() = "PyMCX: Monte Carlo eXtreme Python Interface, www.mcx.space.";

m.def("mcx", &pyMcxInterface, "Runs MCX");
m.def("mcx", &pyMcxInterfaceWargs, "Runs MCX");
m.def("mcx", &printMCXUsage, "");
m.def("gpu_info", &getGPUInfo, "Prints out the list of CUDA-capable devices attached to this system.");
}
Expand Down

0 comments on commit f4cd3c3

Please sign in to comment.