Skip to content

Commit

Permalink
Merge pull request #2 from IntelPython/fix-win-py27
Browse files Browse the repository at this point in the history
define preprocessor variable for inline keyword, and define it empty …
  • Loading branch information
oleksandr-pavlyk authored Apr 21, 2019
2 parents 3f9fed6 + ac0d605 commit 2c6751c
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions mkl/_mklinitmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,15 @@ static struct PyMethodDef methods[] = {
{NULL, NULL, 0, NULL}
};

static inline void _set_mkl_ilp64() {
#ifdef USING_MKL_RT
int i = mkl_set_interface_layer(MKL_INTERFACE_ILP64);
#if defined(_MSC_VER) && (_MSC_VER <= 1500)
#define MKL_SERVICE_INLINE
#else
#define MKL_SERVICE_INLINE inline
#endif
return;
}

static inline void _set_mkl_lp64() {
#ifdef USING_MKL_RT
int i = mkl_set_interface_layer(MKL_INTERFACE_LP64);
#endif
return;
}
static MKL_SERVICE_INLINE void _set_mkl_ilp64();
static MKL_SERVICE_INLINE void _set_mkl_lp64();
static MKL_SERVICE_INLINE void _set_mkl_interface();

static void _preload_threading_layer() {
#if FORCE_PRELOADING
Expand Down Expand Up @@ -112,7 +108,21 @@ static void _preload_threading_layer() {
return;
}

static inline void _set_mkl_interface() {
static MKL_SERVICE_INLINE void _set_mkl_ilp64() {
#ifdef USING_MKL_RT
int i = mkl_set_interface_layer(MKL_INTERFACE_ILP64);
#endif
return;
}

static MKL_SERVICE_INLINE void _set_mkl_lp64() {
#ifdef USING_MKL_RT
int i = mkl_set_interface_layer(MKL_INTERFACE_LP64);
#endif
return;
}

static MKL_SERVICE_INLINE void _set_mkl_interface() {
_set_mkl_lp64();
_preload_threading_layer();
}
Expand Down

0 comments on commit 2c6751c

Please # to comment.