You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/04/19 06:40:50 UTC
[GitHub] [incubator-mxnet] pengzhao-intel commented on a change in pull
request #14740: Change size_t to int within for loop to fix windows build
error
pengzhao-intel commented on a change in pull request #14740: Change size_t to int within for loop to fix windows build error
URL: https://github.com/apache/incubator-mxnet/pull/14740#discussion_r276912992
##########
File path: src/operator/subgraph/mkldnn/mkldnn_fc.cc
##########
@@ -156,7 +156,7 @@ void SgMKLDNNFCOp::Forward(const OpContext &ctx,
int32_t *quantized_bias_ptr = cached_bias_.data().dptr<int32_t>();
size_t bias_size = bias.shape().Size();
#pragma omp parallel for num_threads(engine::OpenMP::Get()->GetRecommendedOMPThreadCount())
- for (size_t i = 0; i < bias_size; ++i) {
+ for (int i = 0; i < static_cast<int>(bias_size); ++i) {
Review comment:
Is the `static_cat` from `size_t` to `int` safety if the value of bias_size is large than the range of `int`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services