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

Commit 4f2af2d

Browse files
cjolivier01Olivier
authored andcommitted
Fix unused type warning (#8316)
1 parent cab51bf commit 4f2af2d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/operator/tensor/init_op.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -325,11 +325,9 @@ inline bool RangeShape(const nnvm::NodeAttrs& attrs,
325325
<< "Invalid range (start, stop, step)= "
326326
<< "(" << param.start << "," << param.stop.value() << "," << param.step << ")";
327327
}
328-
MSHADOW_TYPE_SWITCH(param.dtype, DType, {
329-
double out_size = std::ceil((param.stop.value() - param.start) / param.step)
330-
* param.repeat;
331-
SHAPE_ASSIGN_CHECK(*out_attrs, 0, TShape({static_cast<nnvm::dim_t>(out_size)}));
332-
});
328+
const double out_size = std::ceil((param.stop.value() - param.start) / param.step)
329+
* param.repeat;
330+
SHAPE_ASSIGN_CHECK(*out_attrs, 0, TShape({static_cast<nnvm::dim_t>(out_size)}));
333331
return true;
334332
}
335333

0 commit comments

Comments
 (0)