Skip to content

Commit

Permalink
fix lint (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-haibin-lin authored May 19, 2017
1 parent 3bcb9f2 commit 3ad88f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/operator/tensor/elemwise_unary_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,8 @@ void CastStorageDnsCsrImpl(mshadow::Stream<xpu> *s, const TBlob& dns, NDArray* c
indptr[i+1] += indptr[i];
}
// allocate column idx array and value array
csr->CheckAndAllocAuxData(csr::kIdx, mshadow::Shape1(static_cast<index_t>(indptr[num_rows])));
csr->CheckAndAllocAuxData(csr::kIdx,
mshadow::Shape1(static_cast<index_t>(indptr[num_rows])));
csr->CheckAndAllocData(mshadow::Shape1(static_cast<index_t>(indptr[num_rows])));
// fill col_idx and value arrays of the csr
mxnet_op::Kernel<FillCsrColIdxAndVals, xpu>::Launch(s, num_rows,
Expand Down
2 changes: 1 addition & 1 deletion src/operator/tensor/init_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ template<typename xpu>
void FillZerosCsrImpl(mshadow::Stream<xpu> *s, NDArray *dst) {
if (!dst->storage_initialized()) return;
// reset the shapes if it's not zeros
TShape new_shape({0});
mshadow::Shape1 new_shape(0);
dst->SetAuxShape(csr::kIndPtr, new_shape);
dst->SetAuxShape(csr::kIdx, new_shape);
dst->SetStorageShape(new_shape);
Expand Down

0 comments on commit 3ad88f8

Please sign in to comment.