From ae360000b637c60a237839a529dccf4a23e65e70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=98=A5=E4=B9=94?= <83450930+Liyulingyue@users.noreply.github.com> Date: Thu, 25 May 2023 10:33:46 +0800 Subject: [PATCH] fix return bool (#54096) --- paddle/phi/api/include/tensor.h | 39 +++++++++++---------------------- 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/paddle/phi/api/include/tensor.h b/paddle/phi/api/include/tensor.h index 603d12c4f77..dd1c1637acf 100644 --- a/paddle/phi/api/include/tensor.h +++ b/paddle/phi/api/include/tensor.h @@ -219,40 +219,35 @@ class PADDLE_API Tensor final { /** * @brief Determine whether tensor is DenseTensor * - * @return true - * @return false + * @return bool */ bool is_dense_tensor() const; /** * @brief Determine whether tensor is SelectedRows * - * @return true - * @return false + * @return bool */ bool is_selected_rows() const; /** * @brief Determine whether tensor is SparseCooTensor * - * @return true - * @return false + * @return bool */ bool is_sparse_coo_tensor() const; /** * @brief Determine whether tensor is SparseCsrTensor * - * @return true - * @return false + * @return bool */ bool is_sparse_csr_tensor() const; /** * @brief Determine whether tensor is StringTensor * - * @return true - * @return false + * @return bool */ bool is_string_tensor() const; @@ -268,40 +263,35 @@ class PADDLE_API Tensor final { /** * @brief Determine whether the tensor device is CPU * - * @return true - * @return false + * @return bool */ bool is_cpu() const; /** * @brief Determine whether the tensor device is GPU * - * @return true - * @return false + * @return bool */ bool is_gpu() const; /** * @brief Determine whether the tensor device is GPU_PINNED * - * @return true - * @return false + * @return bool */ bool is_gpu_pinned() const; /** * @brief Determine whether the tensor device is XPU * - * @return true - * @return false + * @return bool */ bool is_xpu() const; /** * @brief Determine whether the tensor device is CustomDevice * - * @return true - * @return false + * @return bool */ bool is_custom_device() const; @@ -482,16 +472,14 @@ class PADDLE_API Tensor final { /** * @brief Determine whether it is a meaningful Tensor * - * @return true - * @return false + * @return bool */ bool defined() const; /** * @brief Determine whether Tensor is initialized. * - * @return true - * @return false + * @return bool */ bool initialized() const; @@ -499,8 +487,7 @@ class PADDLE_API Tensor final { * @brief Determine whether Tensor is initialized. * This is a deprecated method and may be removed in the future! * - * @return true - * @return false + * @return bool */ bool is_initialized() const; -- GitLab