diff --git a/mshadow/base.h b/mshadow/base.h index 4cdab74d..d08efd38 100755 --- a/mshadow/base.h +++ b/mshadow/base.h @@ -285,7 +285,11 @@ const unsigned kRandBufferSize = 1000000; /*! \brief pi */ const float kPi = 3.1415926f; /*! \brief type that will be used for index */ -typedef int64_t index_t; +#if MSHADOW_INT64_TENSOR_SIZE == 1 + typedef int64_t index_t; +#else + typedef int32_t index_t; +#endif #ifdef _WIN32 /*! \brief openmp index for windows */ diff --git a/mshadow/tensor.h b/mshadow/tensor.h index b04b154d..0d662621 100755 --- a/mshadow/tensor.h +++ b/mshadow/tensor.h @@ -1069,10 +1069,10 @@ inline void BatchGEMM(Tensor dst, #define MSHADOW_SCALAR_ double #include "./expr_scalar-inl.h" #undef MSHADOW_SCALAR_ -#define MSHADOW_SCALAR_ int +#define MSHADOW_SCALAR_ int32_t #include "./expr_scalar-inl.h" #undef MSHADOW_SCALAR_ -#define MSHADOW_SCALAR_ mshadow::index_t +#define MSHADOW_SCALAR_ int64_t #include "./expr_scalar-inl.h" #undef MSHADOW_SCALAR_ #define MSHADOW_SCALAR_ mshadow::half::half_t