Caffe2 - C++ API
A deep learning, cross platform ML framework
python_functions.cpp
1 #include "python_functions.h"
2 
3 // ${generated_comment}
4 
5 #include <Python.h>
6 #include <ATen/ATen.h>
7 
8 #include "Functions.h"
9 #include "torch/csrc/autograd/python_cpp_function.h"
10 
11 namespace torch { namespace autograd { namespace generated {
12 
13 template<typename C>
14 static void addClass(PyTypeObject& type, const char* name,
15  PyGetSetDef* function_properties=NULL, PyMethodDef* function_methods=NULL)
16 {
17  _initFunctionPyTypeObject(type, name, function_properties, function_methods);
18  Py_INCREF(&type);
19  registerCppFunction(typeid(C), &type);
20 }
21 
22 void initialize_autogenerated_functions() {
23  ${py_function_initializers}
24 }
25 
26 }}} // namespace torch::autograd::generated
Definition: static.cpp:64
Definition: jit_type.h:17