未验证 提交 be8ab0ea 编写于 作者: Z zhangkaihuo 提交者: GitHub

fix compilation warning on mac (#39438)

上级 667bd962
......@@ -86,7 +86,7 @@ class SparseCooTensor : public TensorBase,
/// \brief Return the number of elements contained in original dense tensor
/// \return The number of elements contained in original dense tensor
int64_t numel() const { return product(dims_); }
int64_t numel() const override { return product(dims_); }
/// \brief Returns the dims of the original dense tensor.
/// \return The dims of the original dense tensor.
......@@ -100,7 +100,7 @@ class SparseCooTensor : public TensorBase,
/// \brief Returns the data layout of the tensor.
/// \return The data layout of the tensor.
DataLayout layout() const { return DataLayout::SPARSE_COO; }
DataLayout layout() const noexcept override { return DataLayout::SPARSE_COO; }
/// \brief Returns the data place of the tensor.
/// \return The data place of the tensor.
......@@ -108,7 +108,7 @@ class SparseCooTensor : public TensorBase,
/// \brief Test whether the non_zero_elements_ metadata is valid.
/// \return Whether the non_zero_elements_ metadata is valid.
bool valid() const noexcept { return non_zero_elements_.valid(); }
bool valid() const noexcept override { return non_zero_elements_.valid(); }
/// \brief Test whether the non_zero_elements_ storage is allocated.
/// return Whether the non_zero_elements_ storage is allocated.
......
......@@ -86,7 +86,7 @@ class SparseCsrTensor : public TensorBase,
/// \brief Return the number of elements contained in original dense tensor
/// \return The number of elements contained in original dense tensor
int64_t numel() const { return product(dims_); }
int64_t numel() const override { return product(dims_); }
/// \brief Returns the dims of the original dense tensor.
/// \return The dims of the original dense tensor.
......@@ -100,7 +100,7 @@ class SparseCsrTensor : public TensorBase,
/// \brief Returns the data layout of the tensor.
/// \return The data layout of the tensor.
DataLayout layout() const { return DataLayout::SPARSE_CSR; }
DataLayout layout() const noexcept override { return DataLayout::SPARSE_CSR; }
/// \brief Returns the data place of the tensor.
/// \return The data place of the tensor.
......@@ -108,7 +108,7 @@ class SparseCsrTensor : public TensorBase,
/// \brief Test whether the non_zero_elements_ metadata is valid.
/// \return Whether the non_zero_elements_ metadata is valid.
bool valid() const noexcept { return non_zero_elements_.valid(); }
bool valid() const noexcept override { return non_zero_elements_.valid(); }
/// \brief Test whether the non_zero_elements_ storage is allocated.
/// return Whether the non_zero_elements_ storage is allocated.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册