diff --git a/mshadow/extension/fill.h b/mshadow/extension/fill.h index a7b60d258210..4ac62c1673e5 100644 --- a/mshadow/extension/fill.h +++ b/mshadow/extension/fill.h @@ -39,9 +39,10 @@ inline MatFillRowElementExp mat_fill_row_element(const Exp &src, const Exp &val, const Exp &index) { - TypeCheckPass::kDim == 2 && ExpInfo::kDim == 1 && ExpInfo::kDim == 1> - ::Error_Expression_Does_Not_Meet_Dimension_Req(); - return MatFillRowElementExp(src.self(), val.self(), index.self()); + TypeCheckPass::kDim == 2 && ExpInfo::kDim == 1 + && ExpInfo::kDim == 1>::Error_Expression_Does_Not_Meet_Dimension_Req(); + return MatFillRowElementExp(src.self(), + val.self(), index.self()); } //---------------------- @@ -57,10 +58,9 @@ struct Plan, DType> { } MSHADOW_XINLINE DType Eval(index_t y, index_t x) const { index_t idx = static_cast(index_.Eval(0, y)); - if(idx == x) { + if (idx == x) { return static_cast(val_.Eval(0, y)); - } - else { + } else { return static_cast(src_.Eval(y, x)); } } @@ -87,7 +87,7 @@ struct ShapeCheck > { Shape<1> shape_val = ShapeCheck<1, ValExp>::Check(t.val_); Shape<1> shape_index = ShapeCheck<1, IndexExp>::Check(t.index_); CHECK((shape_src[0] == shape_index[0]) && (shape_index[0] == shape_val[0])) - << "mat_fill_row_element index vector length, val vector length and number of rows in matrix"; + << "mat_fill_row_element index length, val length and number of rows in matrix"; return shape_src; } }; @@ -95,7 +95,8 @@ struct ShapeCheck > { template struct ExpInfo > { static const int kDim = 2; - static const int kDevMask = ExpInfo::kDevMask & ExpInfo::kDevMask & ExpInfo::kDevMask; + static const int kDevMask = + ExpInfo::kDevMask & ExpInfo::kDevMask & ExpInfo::kDevMask; }; } // namespace expr } // namespace mshadow