未验证 提交 ae360000 编写于 作者: 张春乔 提交者: GitHub

fix return bool (#54096)

上级 43d6bdca
...@@ -219,40 +219,35 @@ class PADDLE_API Tensor final { ...@@ -219,40 +219,35 @@ class PADDLE_API Tensor final {
/** /**
* @brief Determine whether tensor is DenseTensor * @brief Determine whether tensor is DenseTensor
* *
* @return true * @return bool
* @return false
*/ */
bool is_dense_tensor() const; bool is_dense_tensor() const;
/** /**
* @brief Determine whether tensor is SelectedRows * @brief Determine whether tensor is SelectedRows
* *
* @return true * @return bool
* @return false
*/ */
bool is_selected_rows() const; bool is_selected_rows() const;
/** /**
* @brief Determine whether tensor is SparseCooTensor * @brief Determine whether tensor is SparseCooTensor
* *
* @return true * @return bool
* @return false
*/ */
bool is_sparse_coo_tensor() const; bool is_sparse_coo_tensor() const;
/** /**
* @brief Determine whether tensor is SparseCsrTensor * @brief Determine whether tensor is SparseCsrTensor
* *
* @return true * @return bool
* @return false
*/ */
bool is_sparse_csr_tensor() const; bool is_sparse_csr_tensor() const;
/** /**
* @brief Determine whether tensor is StringTensor * @brief Determine whether tensor is StringTensor
* *
* @return true * @return bool
* @return false
*/ */
bool is_string_tensor() const; bool is_string_tensor() const;
...@@ -268,40 +263,35 @@ class PADDLE_API Tensor final { ...@@ -268,40 +263,35 @@ class PADDLE_API Tensor final {
/** /**
* @brief Determine whether the tensor device is CPU * @brief Determine whether the tensor device is CPU
* *
* @return true * @return bool
* @return false
*/ */
bool is_cpu() const; bool is_cpu() const;
/** /**
* @brief Determine whether the tensor device is GPU * @brief Determine whether the tensor device is GPU
* *
* @return true * @return bool
* @return false
*/ */
bool is_gpu() const; bool is_gpu() const;
/** /**
* @brief Determine whether the tensor device is GPU_PINNED * @brief Determine whether the tensor device is GPU_PINNED
* *
* @return true * @return bool
* @return false
*/ */
bool is_gpu_pinned() const; bool is_gpu_pinned() const;
/** /**
* @brief Determine whether the tensor device is XPU * @brief Determine whether the tensor device is XPU
* *
* @return true * @return bool
* @return false
*/ */
bool is_xpu() const; bool is_xpu() const;
/** /**
* @brief Determine whether the tensor device is CustomDevice * @brief Determine whether the tensor device is CustomDevice
* *
* @return true * @return bool
* @return false
*/ */
bool is_custom_device() const; bool is_custom_device() const;
...@@ -482,16 +472,14 @@ class PADDLE_API Tensor final { ...@@ -482,16 +472,14 @@ class PADDLE_API Tensor final {
/** /**
* @brief Determine whether it is a meaningful Tensor * @brief Determine whether it is a meaningful Tensor
* *
* @return true * @return bool
* @return false
*/ */
bool defined() const; bool defined() const;
/** /**
* @brief Determine whether Tensor is initialized. * @brief Determine whether Tensor is initialized.
* *
* @return true * @return bool
* @return false
*/ */
bool initialized() const; bool initialized() const;
...@@ -499,8 +487,7 @@ class PADDLE_API Tensor final { ...@@ -499,8 +487,7 @@ class PADDLE_API Tensor final {
* @brief Determine whether Tensor is initialized. * @brief Determine whether Tensor is initialized.
* This is a deprecated method and may be removed in the future! * This is a deprecated method and may be removed in the future!
* *
* @return true * @return bool
* @return false
*/ */
bool is_initialized() const; bool is_initialized() const;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册