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

[NDARRAY] removed inline from the op to be registered #160

Merged
merged 1 commit into from
Sep 26, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/ndarray/ndarray.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ namespace mxnet {
* \param binary_op the real
*/
template<typename OP>
inline void BinaryOp(const NDArray &lhs,
const NDArray &rhs,
NDArray *out) {
void BinaryOp(const NDArray &lhs,
const NDArray &rhs,
NDArray *out) {
// no check if both of them are on cpu
if (lhs.ctx().dev_mask() != cpu::kDevMask || rhs.ctx().dev_mask() != cpu::kDevMask)
CHECK(lhs.ctx() == rhs.ctx()) << "operands context mismatch";
Expand Down Expand Up @@ -76,7 +76,7 @@ inline void BinaryOp(const NDArray &lhs,
}
}

inline void SetValueOp(const real_t &rhs, NDArray *out) {
void SetValueOp(const real_t &rhs, NDArray *out) {
CHECK_NE(out->is_none(), true) << "Set value target must not be empty";
// important: callback must always capture by value
NDArray ret = *out;
Expand Down Expand Up @@ -112,9 +112,9 @@ inline void SetValueOp(const real_t &rhs, NDArray *out) {
* \param binary_op the real
*/
template<typename OP, bool reverse>
inline void ScalarOp(const NDArray &lhs,
const real_t &rhs,
NDArray *out) {
void ScalarOp(const NDArray &lhs,
const real_t &rhs,
NDArray *out) {
if (out->is_none()) {
*out = NDArray(lhs.shape(), lhs.ctx(), true);
} else {
Expand Down Expand Up @@ -220,9 +220,9 @@ inline void CopyFromToSimple(const NDArray &from, NDArray *to) {
}

template<typename Distribution>
inline void SampleOP(const real_t &a,
const real_t &b,
NDArray *out) {
void SampleOP(const real_t &a,
const real_t &b,
NDArray *out) {
CHECK(!out->is_none());
Resource resource = ResourceManager::Get()->Request(
out->ctx(), ResourceRequest::kRandom);
Expand Down