提交 4d4487c5 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Fix inclusion of theano_mod_helper.h to not just happen for python3.

上级 e89c6e68
......@@ -3,6 +3,8 @@
#include <algorithm>
#include "theano_mod_helper.h"
// Defines for Python 2/3 compatibility.
#if PY_MAJOR_VERSION >= 3
// Py3k treats all ints as longs. This one is not caught by npy_3kcompat.h.
......@@ -10,8 +12,6 @@
#include "numpy/npy_3kcompat.h"
#include "theano_mod_helper.h"
// Py3k strings are unicode, these mimic old functionality.
//
// NOTE: npy_3kcompat.h replaces PyString_X with PyBytes_X, which breaks
......@@ -48,15 +48,15 @@
#include <cublas_v2.h>
#ifdef _WIN32
#ifdef _CUDA_NDARRAY_C
#define DllExport __declspec( dllexport )
#else
#define DllExport __declspec( dllimport )
#endif
#define ALWAYS_INLINE
# ifdef _CUDA_NDARRAY_C
# define DllExport __declspec( dllexport )
# else
# define DllExport __declspec( dllimport )
# endif
# define ALWAYS_INLINE
#else //else _WIN32
#define DllExport MOD_PUBLIC
#define ALWAYS_INLINE __attribute__((always_inline))
# define DllExport MOD_PUBLIC
# define ALWAYS_INLINE __attribute__((always_inline))
#endif
typedef float real;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论