From 3ad88f8ecf0d001f9ecd3a8644a1d90328ba4434 Mon Sep 17 00:00:00 2001 From: Haibin Lin Date: Thu, 18 May 2017 21:50:13 -0700 Subject: [PATCH] fix lint (#42) --- src/operator/tensor/elemwise_unary_op.h | 3 ++- src/operator/tensor/init_op.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/operator/tensor/elemwise_unary_op.h b/src/operator/tensor/elemwise_unary_op.h index dcff9531d4d6..3d024b365ac0 100644 --- a/src/operator/tensor/elemwise_unary_op.h +++ b/src/operator/tensor/elemwise_unary_op.h @@ -432,7 +432,8 @@ void CastStorageDnsCsrImpl(mshadow::Stream *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(indptr[num_rows]))); + csr->CheckAndAllocAuxData(csr::kIdx, + mshadow::Shape1(static_cast(indptr[num_rows]))); csr->CheckAndAllocData(mshadow::Shape1(static_cast(indptr[num_rows]))); // fill col_idx and value arrays of the csr mxnet_op::Kernel::Launch(s, num_rows, diff --git a/src/operator/tensor/init_op.h b/src/operator/tensor/init_op.h index edbafeb7d148..a467b4cc89f2 100644 --- a/src/operator/tensor/init_op.h +++ b/src/operator/tensor/init_op.h @@ -144,7 +144,7 @@ template void FillZerosCsrImpl(mshadow::Stream *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);