(self, fout, defs)
| 883 | ) |
| 884 | |
| 885 | def __call__(self, fout, defs): |
| 886 | super().__call__(fout) |
| 887 | self._write("// %s", self._get_header()) |
| 888 | self._write( |
| 889 | "// this file can only be included in " |
| 890 | "megbrain/src/plugin/impl/opr_footprint.cpp\n" |
| 891 | "// please do not include it directly" |
| 892 | ) |
| 893 | self._write('#include "megdnn/opr_param_defs.h"') |
| 894 | self._write("#pragma once") |
| 895 | self._write("using namespace megdnn;") |
| 896 | self._write("namespace mgb {") |
| 897 | self._write("namespace opr {") |
| 898 | self._write("template<class OprParam>") |
| 899 | self._write( |
| 900 | "std::shared_ptr<mgb::json::Value> opr_param_to_json(const OprParam ¶m);" |
| 901 | ) |
| 902 | self._process(defs) |
| 903 | self._write("} // namespace opr") |
| 904 | self._write("} // namespace mgb") |
| 905 | self._write("\n// vim: syntax=cpp.doxygen") |
| 906 | |
| 907 | def _on_param_begin(self, p): |
| 908 | self._write("template<>", indent=0) |
nothing calls this directly
no test coverage detected