Skip to content

Commit

Permalink
Merge pull request apache#49 from antinucleon/master
Browse files Browse the repository at this point in the history
Add constructor with stream for Tensor
  • Loading branch information
antinucleon committed Sep 16, 2015
2 parents d3d6147 + b37cf0e commit cf879e7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mshadow/tensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,10 @@ struct Tensor: public TRValue<Tensor<Device, dimension, DType>,
/*! \brief constructor from data pointer and shape, without stride */
MSHADOW_XINLINE Tensor(DType *dptr, const Shape<dimension> &shape)
: dptr_(dptr), shape_(shape), stride_(shape[kSubdim]), stream_(NULL) {}
/*! \brief constructor from data pointer and shape, without stride */
MSHADOW_XINLINE Tensor(DType *dptr, const Shape<dimension> &shape,
Stream<Device> *stream)
: dptr_(dptr), shape_(shape), stride_(shape[kSubdim]), stream_(stream) {}
/*! \brief constructor from data pointer and shape */
MSHADOW_XINLINE Tensor(DType *dptr,
const Shape<dimension> &shape,
Expand Down

0 comments on commit cf879e7

Please sign in to comment.