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

Is this a bug of operator[] ? #292

Closed
x10000year opened this issue Aug 31, 2017 · 0 comments
Closed

Is this a bug of operator[] ? #292

x10000year opened this issue Aug 31, 2017 · 0 comments

Comments

@x10000year
Copy link

x10000year commented Aug 31, 2017

In line 509 of tensor.h

/*!

  • \brief get a element of dimension - 1
  • \param idx index
  • \return the result tensor
    */
    MSHADOW_XINLINE Tensor<Device, kSubdim, DType> operator[](index_t idx) const {
    return Tensor<Device, kSubdim, DType>(dptr_ + this->MemSize<1>() * idx,
    shape_.SubShape(), stride_, stream_);
    }

The template argument of MemSize seems wrong.

@x10000year x10000year changed the title Is this a bug for operator[] ? Is this a bug of operator[] ? Aug 31, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant