!7239 Fix codedex issue in tensor.h

Merge pull request !7239 from hewei/fix_codedex_1013
This commit is contained in:
mindspore-ci-bot 2020-10-26 10:05:30 +08:00 committed by Gitee
commit 491957a022
1 changed files with 1 additions and 1 deletions

View File

@ -227,7 +227,7 @@ class Tensor : public MetaTensor {
// brief Get Tensor data byte-size for c++ type
//
// return byte size of Tensor data
size_t Size() const { return data().nbytes(); }
size_t Size() const { return static_cast<size_t>(data().nbytes()); }
void *data_c() const { return data_->data(); }