mxnet
Public Member Functions | Public Attributes | List of all members
mshadow::Tensor< Device, 1, DType > Struct Template Reference

#include <tensor.h>

Inheritance diagram for mshadow::Tensor< Device, 1, DType >:
Inheritance graph
Collaboration diagram for mshadow::Tensor< Device, 1, DType >:
Collaboration graph

Public Member Functions

MSHADOW_XINLINE Tensor (void)
 
MSHADOW_XINLINE Tensor (const Shape< 1 > &shape)
 
MSHADOW_XINLINE Tensor (DType *dptr, Shape< 1 > shape)
 
MSHADOW_XINLINE Tensor (DType *dptr, Shape< 1 > shape, Stream< Device > *stream)
 
MSHADOW_XINLINE Tensor (DType *dptr, Shape< 1 > shape, index_t stride, Stream< Device > *stream)
 
void set_stream (Stream< Device > *stream)
 
MSHADOW_XINLINE Tensor< Device, 1, DType > FlatTo1D (void) const
 
MSHADOW_XINLINE Tensor< Device, 2, DType > FlatTo2D (void) const
 
MSHADOW_XINLINE Tensor< Device, 1, DType > Slice (index_t begin, index_t end) const
 
MSHADOW_XINLINE bool CheckContiguous (void) const
 
MSHADOW_XINLINE index_t MSize (void) const
 
MSHADOW_XINLINE index_t size (index_t i) const
 
MSHADOW_XINLINE DType & operator[] (index_t idx)
 
MSHADOW_XINLINE const DType & operator[] (index_t idx) const
 
Tensor< Device, 1, DType > & operator= (const Tensor< Device, 1, DType > &exp)
 implement the assignment of same type More...
 
template<typename E , int etype>
Tensor< Device, 1, DType > & operator= (const expr::Exp< E, DType, etype > &exp)
 
Tensor< Device, 1, DType > & operator= (const DType &exp)
 
- Public Member Functions inherited from mshadow::expr::RValueExp< Tensor< Device, 1, DType >, DType >
const TransposeExp< Tensor< Device, 1, DType >, DType > T (void) const
 transpose of a matrix More...
 
Tensor< Device, 1, DType > & operator+= (DType s)
 operator overload More...
 
Tensor< Device, 1, DType > & operator+= (const Exp< E, DType, etype > &exp)
 implementation of operator+= More...
 
Tensor< Device, 1, DType > & operator-= (DType s)
 operator overload More...
 
Tensor< Device, 1, DType > & operator-= (const Exp< E, DType, etype > &exp)
 implementation of operator-= More...
 
Tensor< Device, 1, DType > & operator*= (DType s)
 operator overload More...
 
Tensor< Device, 1, DType > & operator*= (const Exp< E, DType, etype > &exp)
 implementation of operator*= More...
 
Tensor< Device, 1, DType > & operator/= (DType s)
 operator overload More...
 
Tensor< Device, 1, DType > & operator/= (const Exp< E, DType, etype > &exp)
 implementation of operator/= More...
 
Tensor< Device, 1, DType > & __assign (DType s)
 operator overload More...
 
Tensor< Device, 1, DType > & __assign (const Exp< E, DType, etype > &exp)
 we can not define container = container More...
 
Tensor< Device, 1, DType > & __assign (const Exp< Tensor< Device, 1, DType >, DType, type::kRValue > &exp)
 operator overload, assign More...
 
- Public Member Functions inherited from mshadow::expr::Exp< Tensor< Device, 1, DType >, DType, type::kRValue >
const Tensor< Device, 1, DType > & self (void) const
 
Tensor< Device, 1, DType > * ptrself (void)
 

Public Attributes

DType * dptr_
 
Shape< 1 > shape_
 
index_t stride_
 
Stream< Device > * stream_
 

Constructor & Destructor Documentation

template<typename Device , typename DType >
MSHADOW_XINLINE mshadow::Tensor< Device, 1, DType >::Tensor ( void  )
inline
template<typename Device , typename DType >
MSHADOW_XINLINE mshadow::Tensor< Device, 1, DType >::Tensor ( const Shape< 1 > &  shape)
inline
template<typename Device , typename DType >
MSHADOW_XINLINE mshadow::Tensor< Device, 1, DType >::Tensor ( DType *  dptr,
Shape< 1 >  shape 
)
inline
template<typename Device , typename DType >
MSHADOW_XINLINE mshadow::Tensor< Device, 1, DType >::Tensor ( DType *  dptr,
Shape< 1 >  shape,
Stream< Device > *  stream 
)
inline
template<typename Device , typename DType >
MSHADOW_XINLINE mshadow::Tensor< Device, 1, DType >::Tensor ( DType *  dptr,
Shape< 1 >  shape,
index_t  stride,
Stream< Device > *  stream 
)
inline

Member Function Documentation

template<typename Device , typename DType >
MSHADOW_XINLINE bool mshadow::Tensor< Device, 1, DType >::CheckContiguous ( void  ) const
inline
template<typename Device , typename DType >
MSHADOW_XINLINE Tensor<Device, 1, DType> mshadow::Tensor< Device, 1, DType >::FlatTo1D ( void  ) const
inline
template<typename Device , typename DType >
MSHADOW_XINLINE Tensor<Device, 2, DType> mshadow::Tensor< Device, 1, DType >::FlatTo2D ( void  ) const
inline
template<typename Device , typename DType >
MSHADOW_XINLINE index_t mshadow::Tensor< Device, 1, DType >::MSize ( void  ) const
inline
template<typename Device , typename DType >
Tensor<Device, 1, DType>& mshadow::Tensor< Device, 1, DType >::operator= ( const Tensor< Device, 1, DType > &  exp)
inline

implement the assignment of same type

template<typename Device , typename DType >
template<typename E , int etype>
Tensor<Device, 1, DType>& mshadow::Tensor< Device, 1, DType >::operator= ( const expr::Exp< E, DType, etype > &  exp)
inline
template<typename Device , typename DType >
Tensor<Device, 1, DType>& mshadow::Tensor< Device, 1, DType >::operator= ( const DType &  exp)
inline
template<typename Device , typename DType >
MSHADOW_XINLINE DType& mshadow::Tensor< Device, 1, DType >::operator[] ( index_t  idx)
inline
template<typename Device , typename DType >
MSHADOW_XINLINE const DType& mshadow::Tensor< Device, 1, DType >::operator[] ( index_t  idx) const
inline
template<typename Device , typename DType >
void mshadow::Tensor< Device, 1, DType >::set_stream ( Stream< Device > *  stream)
inline
template<typename Device , typename DType >
MSHADOW_XINLINE index_t mshadow::Tensor< Device, 1, DType >::size ( index_t  i) const
inline
template<typename Device , typename DType >
MSHADOW_XINLINE Tensor<Device, 1, DType> mshadow::Tensor< Device, 1, DType >::Slice ( index_t  begin,
index_t  end 
) const
inline

Member Data Documentation

template<typename Device , typename DType >
DType* mshadow::Tensor< Device, 1, DType >::dptr_
template<typename Device , typename DType >
Shape<1> mshadow::Tensor< Device, 1, DType >::shape_
template<typename Device , typename DType >
Stream<Device>* mshadow::Tensor< Device, 1, DType >::stream_
template<typename Device , typename DType >
index_t mshadow::Tensor< Device, 1, DType >::stride_

The documentation for this struct was generated from the following file: