Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
remove macro
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaotaoChen committed Dec 10, 2018
1 parent 8a84a3e commit 4a93f20
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/operator/tensor/elemwise_unary_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -353,13 +353,13 @@ class UnaryOp : public OpBase {
}

#if MSHADOW_USE_MKL == 1
#define MKLLOG(fname, DType) \
static void MKLLog(size_t size, const DType* pIn, DType* pOut) { \
fname(size, pIn, pOut); \
static inline void MKL_Log(int size, const float* pIn, float* pOut) {
vsLn(size, pIn, pOut);
}

MKLLOG(vsLn, float)
MKLLOG(vdLn, double)
static inline void MKL_Log(int size, const double* pIn, double* pOut) {
vdLn(size, pIn, pOut);
}
#endif

template<typename xpu, typename OP>
Expand All @@ -376,7 +376,7 @@ MKLLOG(vdLn, double)
if (req[0] == kWriteTo && (type_flag == mshadow::kFloat32
|| type_flag == mshadow::kFloat64)) {
MSHADOW_SGL_DBL_TYPE_SWITCH(type_flag, DType, {
MKLLog(inputs[0].Size(), inputs[0].dptr<DType>(), outputs[0].dptr<DType>());
MKL_Log(inputs[0].Size(), inputs[0].dptr<DType>(), outputs[0].dptr<DType>());
})
} else {
Compute<xpu, OP>(attrs, ctx, inputs, req, outputs);
Expand Down

0 comments on commit 4a93f20

Please sign in to comment.