From b37cf0ec60cf3c29a639aa2b919d53beb7d83ff9 Mon Sep 17 00:00:00 2001 From: Bing Xu Date: Tue, 15 Sep 2015 17:56:10 -0600 Subject: [PATCH] Add constructor with stream --- mshadow/tensor.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mshadow/tensor.h b/mshadow/tensor.h index 19c70de17f17..bdc76e3a725e 100644 --- a/mshadow/tensor.h +++ b/mshadow/tensor.h @@ -295,6 +295,10 @@ struct Tensor: public TRValue, /*! \brief constructor from data pointer and shape, without stride */ MSHADOW_XINLINE Tensor(DType *dptr, const Shape &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 &shape, + Stream *stream) + : dptr_(dptr), shape_(shape), stride_(shape[kSubdim]), stream_(stream) {} /*! \brief constructor from data pointer and shape */ MSHADOW_XINLINE Tensor(DType *dptr, const Shape &shape,