• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <Python.h>
2 
3 #include "benchmarks.pb.h"
4 #include "datasets/google_message1/proto2/benchmark_message1_proto2.pb.h"
5 #include "datasets/google_message1/proto3/benchmark_message1_proto3.pb.h"
6 #include "datasets/google_message2/benchmark_message2.pb.h"
7 #include "datasets/google_message3/benchmark_message3.pb.h"
8 #include "datasets/google_message4/benchmark_message4.pb.h"
9 
10 static PyMethodDef python_benchmark_methods[] = {
11     {NULL, NULL, 0, NULL}        /* Sentinel */
12 };
13 
14 
15 PyMODINIT_FUNC
initlibbenchmark_messages()16 initlibbenchmark_messages() {
17   benchmarks::BenchmarkDataset().descriptor();
18   benchmarks::proto3::GoogleMessage1().descriptor();
19   benchmarks::proto2::GoogleMessage1().descriptor();
20   benchmarks::proto2::GoogleMessage2().descriptor();
21   benchmarks::google_message3::GoogleMessage3().descriptor();
22   benchmarks::google_message4::GoogleMessage4().descriptor();
23 
24   PyObject *m;
25 
26   m = Py_InitModule("libbenchmark_messages", python_benchmark_methods);
27   if (m == NULL)
28       return;
29 }
30