mxnet
Classes | Enumerations | Functions
mshadow::packet Namespace Reference

namespace of packet math More...

Classes

struct  AlignBytes
 
struct  Packet
 Generic packet type. More...
 
struct  Packet< double, kSSE2 >
 vector real type for float More...
 
struct  Packet< DType, kPlain >
 
struct  Packet< float, kSSE2 >
 
struct  PacketOp
 generic Packet operator More...
 
struct  PacketOp< op::div, DType, Arch >
 
struct  PacketOp< op::identity, DType, Arch >
 
struct  PacketOp< op::minus, DType, Arch >
 
struct  PacketOp< op::mul, DType, Arch >
 
struct  PacketOp< op::plus, DType, Arch >
 
struct  Saver
 
struct  Saver< sv::saveto, TFloat, Arch >
 

Enumerations

enum  PacketArch { kPlain, kSSE2 }
 

Functions

template<typename DType >
MSHADOW_CINLINE Packet< DType, kPlainoperator+ (const Packet< DType, kPlain > &lhs, const Packet< DType, kPlain > &rhs)
 
template<typename DType >
MSHADOW_CINLINE Packet< DType, kPlainoperator- (const Packet< DType, kPlain > &lhs, const Packet< DType, kPlain > &rhs)
 
template<typename DType >
MSHADOW_CINLINE Packet< DType, kPlainoperator* (const Packet< DType, kPlain > &lhs, const Packet< DType, kPlain > &rhs)
 
template<typename DType >
MSHADOW_CINLINE Packet< DType, kPlainoperator/ (const Packet< DType, kPlain > &lhs, const Packet< DType, kPlain > &rhs)
 
MSHADOW_CINLINE Packet< float, kSSE2operator+ (const Packet< float, kSSE2 > &lhs, const Packet< float, kSSE2 > &rhs)
 
MSHADOW_CINLINE Packet< double, kSSE2operator+ (const Packet< double, kSSE2 > &lhs, const Packet< double, kSSE2 > &rhs)
 
MSHADOW_CINLINE Packet< float, kSSE2operator- (const Packet< float, kSSE2 > &lhs, const Packet< float, kSSE2 > &rhs)
 
MSHADOW_CINLINE Packet< double, kSSE2operator- (const Packet< double, kSSE2 > &lhs, const Packet< double, kSSE2 > &rhs)
 
MSHADOW_CINLINE Packet< float, kSSE2operator* (const Packet< float, kSSE2 > &lhs, const Packet< float, kSSE2 > &rhs)
 
MSHADOW_CINLINE Packet< double, kSSE2operator* (const Packet< double, kSSE2 > &lhs, const Packet< double, kSSE2 > &rhs)
 
MSHADOW_CINLINE Packet< float, kSSE2operator/ (const Packet< float, kSSE2 > &lhs, const Packet< float, kSSE2 > &rhs)
 
MSHADOW_CINLINE Packet< double, kSSE2operator/ (const Packet< double, kSSE2 > &lhs, const Packet< double, kSSE2 > &rhs)
 
void * AlignedMallocPitch (size_t *out_pitch, size_t lspace, size_t num_line)
 analog to cudaMallocPitch, allocate a aligned space with num_line * lspace cells More...
 
void AlignedFree (void *ptr)
 free aligned space More...
 
template<PacketArch Arch>
bool CheckAlign (size_t pitch)
 check if a pointer is aligned More...
 
template<PacketArch Arch>
bool CheckAlign (void *ptr)
 check if a pointer is aligned More...
 
template<typename DType , PacketArch Arch>
index_t UpperAlign (index_t size)
 get upper bound of aligned index of size More...
 
template<typename DType , PacketArch Arch>
index_t LowerAlign (index_t size)
 get lower bound of aligned index of size More...
 

Detailed Description

namespace of packet math

Enumeration Type Documentation

Enumerator
kPlain 
kSSE2 

Function Documentation

void mshadow::packet::AlignedFree ( void *  ptr)
inline

free aligned space

Parameters
ptrpointer to space to be freed
void* mshadow::packet::AlignedMallocPitch ( size_t *  out_pitch,
size_t  lspace,
size_t  num_line 
)
inline

analog to cudaMallocPitch, allocate a aligned space with num_line * lspace cells

Parameters
out_pitchoutput parameter, the actuall space allocated for each line
lspacenumber of cells required for each line
num_linenumber of lines to be allocated
template<PacketArch Arch>
bool mshadow::packet::CheckAlign ( size_t  pitch)
inline

check if a pointer is aligned

template<PacketArch Arch>
bool mshadow::packet::CheckAlign ( void *  ptr)
inline

check if a pointer is aligned

template<typename DType , PacketArch Arch>
index_t mshadow::packet::LowerAlign ( index_t  size)
inline

get lower bound of aligned index of size

Parameters
sizesize of the array
fsizesize of float
template<typename DType >
MSHADOW_CINLINE Packet<DType, kPlain> mshadow::packet::operator* ( const Packet< DType, kPlain > &  lhs,
const Packet< DType, kPlain > &  rhs 
)
MSHADOW_CINLINE Packet<float, kSSE2> mshadow::packet::operator* ( const Packet< float, kSSE2 > &  lhs,
const Packet< float, kSSE2 > &  rhs 
)
MSHADOW_CINLINE Packet<double, kSSE2> mshadow::packet::operator* ( const Packet< double, kSSE2 > &  lhs,
const Packet< double, kSSE2 > &  rhs 
)
template<typename DType >
MSHADOW_CINLINE Packet<DType, kPlain> mshadow::packet::operator+ ( const Packet< DType, kPlain > &  lhs,
const Packet< DType, kPlain > &  rhs 
)
MSHADOW_CINLINE Packet<float, kSSE2> mshadow::packet::operator+ ( const Packet< float, kSSE2 > &  lhs,
const Packet< float, kSSE2 > &  rhs 
)
MSHADOW_CINLINE Packet<double, kSSE2> mshadow::packet::operator+ ( const Packet< double, kSSE2 > &  lhs,
const Packet< double, kSSE2 > &  rhs 
)
template<typename DType >
MSHADOW_CINLINE Packet<DType, kPlain> mshadow::packet::operator- ( const Packet< DType, kPlain > &  lhs,
const Packet< DType, kPlain > &  rhs 
)
MSHADOW_CINLINE Packet<float, kSSE2> mshadow::packet::operator- ( const Packet< float, kSSE2 > &  lhs,
const Packet< float, kSSE2 > &  rhs 
)
MSHADOW_CINLINE Packet<double, kSSE2> mshadow::packet::operator- ( const Packet< double, kSSE2 > &  lhs,
const Packet< double, kSSE2 > &  rhs 
)
template<typename DType >
MSHADOW_CINLINE Packet<DType, kPlain> mshadow::packet::operator/ ( const Packet< DType, kPlain > &  lhs,
const Packet< DType, kPlain > &  rhs 
)
MSHADOW_CINLINE Packet<float, kSSE2> mshadow::packet::operator/ ( const Packet< float, kSSE2 > &  lhs,
const Packet< float, kSSE2 > &  rhs 
)
MSHADOW_CINLINE Packet<double, kSSE2> mshadow::packet::operator/ ( const Packet< double, kSSE2 > &  lhs,
const Packet< double, kSSE2 > &  rhs 
)
template<typename DType , PacketArch Arch>
index_t mshadow::packet::UpperAlign ( index_t  size)
inline

get upper bound of aligned index of size

Parameters
sizesize of the array
fsizesize of float