Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Revert "Allow large array operation in MXNet (#348)" #357

Merged
merged 1 commit into from
Sep 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mshadow/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ const unsigned kRandBufferSize = 1000000;
/*! \brief pi */
const float kPi = 3.1415926f;
/*! \brief type that will be used for index */
typedef int64_t index_t;
typedef unsigned index_t;

#ifdef _WIN32
/*! \brief openmp index for windows */
Expand Down
12 changes: 6 additions & 6 deletions mshadow/tensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ struct Shape {
return s;
}
/*! \return number of valid elements */
MSHADOW_XINLINE index_t Size(void) const {
index_t size = this->shape_[0];
MSHADOW_XINLINE size_t Size(void) const {
size_t size = this->shape_[0];
#pragma unroll
for (int i = 1; i < kDimension; ++i) {
size *= this->shape_[i];
Expand Down Expand Up @@ -458,8 +458,8 @@ struct Tensor: public TRValue<Tensor<Device, dimension, DType>,
* \tparam startdim the starting dimension
*/
template<int startdim>
MSHADOW_XINLINE index_t MemSize(void) const {
index_t memsz = this->stride_;
MSHADOW_XINLINE size_t MemSize(void) const {
size_t memsz = this->stride_;
#pragma unroll
for (int i = startdim; i < kSubdim; ++i) {
memsz *= this->shape_[i];
Expand All @@ -476,7 +476,7 @@ struct Tensor: public TRValue<Tensor<Device, dimension, DType>,
/*!
* \return memory cost of the tensor, including the aligned x dimension
*/
MSHADOW_XINLINE index_t MSize(void) const {
MSHADOW_XINLINE size_t MSize(void) const {
return this->MemSize<0>();
}
/*!
Expand Down Expand Up @@ -582,7 +582,7 @@ struct Tensor<Device, 1, DType>:
MSHADOW_XINLINE bool CheckContiguous(void) const {
return true;
}
MSHADOW_XINLINE index_t MSize(void) const {
MSHADOW_XINLINE size_t MSize(void) const {
return shape_[0];
}
MSHADOW_XINLINE index_t size(index_t i) const {
Expand Down