This is an automated email from the ASF dual-hosted git repository. cjolivier01 pushed a commit to branch cython in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
commit 4b57c36c7e9cf7b44bbb224a49fa72d1f418a289 Author: Olivier <cooli...@amazon.com> AuthorDate: Thu Mar 8 09:48:15 2018 -0800 cython timing tests --- python/mxnet/cython/base.pyi | 8 ++++++++ python/mxnet/cython/mxcython.pyx | 4 ++-- src/cython/{cython_util.cc => cpp_api.cc} | 2 +- src/cython/{cython_util.h => cpp_api.h} | 6 +++--- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/python/mxnet/cython/base.pyi b/python/mxnet/cython/base.pyi index 3963b37..f3063d1 100644 --- a/python/mxnet/cython/base.pyi +++ b/python/mxnet/cython/base.pyi @@ -1,9 +1,17 @@ from ...base import MXNetError +# +# STL Imports +# from libcpp.vector cimport vector +from libcpp.list cimport list from libcpp.string cimport string + from cpython.version cimport PY_MAJOR_VERSION +# +# MXNet Imports +# ctypedef void* SymbolHandle ctypedef void* NDArrayHandle ctypedef void* OpHandle diff --git a/python/mxnet/cython/mxcython.pyx b/python/mxnet/cython/mxcython.pyx index 96a0034..98b102c 100644 --- a/python/mxnet/cython/mxcython.pyx +++ b/python/mxnet/cython/mxcython.pyx @@ -27,14 +27,14 @@ from libc.stdint cimport uint32_t, int64_t include "./base.pyi" # C API functions -cdef extern from "../../../src/cython/cython_util.h": +cdef extern from "../../../src/cython/cpp_api.h": int CythonPrintFromCPP(const char *foo); int Printf(const char *fmt, ...); int TrivialCPPCall(int var); unsigned long long TimeInMilliseconds(); # C++ Rectangle class -cdef extern from "../../../src/cython/cython_util.h" namespace "shapes": +cdef extern from "../../../src/cython/cpp_api.h" namespace "shapes": cdef cppclass Rectangle: Rectangle() except + Rectangle(int, int, int, int) except + diff --git a/src/cython/cython_util.cc b/src/cython/cpp_api.cc similarity index 99% rename from src/cython/cython_util.cc rename to src/cython/cpp_api.cc index 7aeddbd..85735c5 100644 --- a/src/cython/cython_util.cc +++ b/src/cython/cpp_api.cc @@ -20,7 +20,7 @@ #include <cstdarg> #include <sys/time.h> #include <chrono> -#include "./cython_util.h" +#include "cpp_api.h" extern "C" int CythonPrintFromCPP(const char *foo) { if(foo) { diff --git a/src/cython/cython_util.h b/src/cython/cpp_api.h similarity index 92% rename from src/cython/cython_util.h rename to src/cython/cpp_api.h index 8d519cf..249e33d 100644 --- a/src/cython/cython_util.h +++ b/src/cython/cpp_api.h @@ -16,8 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -#ifndef MXNET_CYTHON_CYTHON_UTIL_H_ -#define MXNET_CYTHON_CYTHON_UTIL_H_ +#ifndef MXNET_CYTHON_CPP_API_H_ +#define MXNET_CYTHON_CPP_API_H_ /*! \brief Inhibit C++ name-mangling for MXNet functions. */ #ifdef __cplusplus @@ -48,4 +48,4 @@ class Rectangle { } // namespace shapes -#endif // MXNET_CYTHON_CYTHON_UTIL_H_ +#endif // MXNET_CYTHON_CPP_API_H_ -- To stop receiving notification emails like this one, please contact cjolivie...@apache.org.