[arrayfire] 134/248: Add return type docs for functions with varying return type

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Tue Nov 17 15:54:16 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch dfsg-clean
in repository arrayfire.

commit ded532017470415cc3c5898c95eb57bf00845577
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date:   Mon Oct 19 15:35:52 2015 -0400

    Add return type docs for functions with varying return type
---
 docs/details/algorithm.dox | 38 +++++++++++++++++++++++++++++++++++++-
 docs/details/image.dox     |  3 +++
 include/af/arith.h         | 20 ++++++++++----------
 include/af/array.h         | 16 ++++++++--------
 include/af/image.h         |  6 +++---
 5 files changed, 61 insertions(+), 22 deletions(-)

diff --git a/docs/details/algorithm.dox b/docs/details/algorithm.dox
index d2d0d50..a823572 100644
--- a/docs/details/algorithm.dox
+++ b/docs/details/algorithm.dox
@@ -15,6 +15,15 @@ This function performs the operation across all batches present in the input sim
 
 Find the sum of values in the input
 
+This table defines the return value types for the corresponding input types
+
+Input Type          | Output Type
+--------------------|---------------------
+f32, f64, c32, c64  | same as input
+s32, u32, s64, u64  | same as input
+s16                 | s32
+u16, u8, b8         | u32
+
 \copydoc batch_detail_algo
 
 
@@ -25,6 +34,15 @@ Find the sum of values in the input
 
 Find the product of values in the input
 
+This table defines the return value types for the corresponding input types
+
+Input Type          | Output Type
+--------------------|---------------------
+f32, f64, c32, c64  | same as input
+s32, u32, s64, u64  | same as input
+s16                 | s32
+u16, u8, b8         | u32
+
 \copydoc batch_detail_algo
 
 
@@ -55,6 +73,8 @@ Find the maximum values and their locations
 
 Find if of all of the values in input are true
 
+Return type is b8 for all input types
+
 \copydoc batch_detail_algo
 
 
@@ -65,6 +85,8 @@ Find if of all of the values in input are true
 
 Find if of any of the values in input are true
 
+Return type is b8 for all input types
+
 \copydoc batch_detail_algo
 
 
@@ -75,6 +97,8 @@ Find if of any of the values in input are true
 
 Count the number of non-zero elements in the input
 
+Return type is u32 for all input types
+
 \copydoc batch_detail_algo
 
 
@@ -85,6 +109,15 @@ Count the number of non-zero elements in the input
 
 Perform exclusive sum along specified dimension
 
+This table defines the return value types for the corresponding input types
+
+Input Type          | Output Type
+--------------------|---------------------
+f32, f64, c32, c64  | same as input
+s32, u32, s64, u64  | same as input
+s16                 | s32
+u16, u8, b8         | u32
+
 \copydoc batch_detail_algo
 
 
@@ -95,6 +128,8 @@ Perform exclusive sum along specified dimension
 
 Locate the indices of non-zero elements
 
+Return type is u32 for all input types
+
 The locations are provided by flattening the input into a linear array.
 
 
@@ -135,7 +170,8 @@ Sort an multi dimensional array
 
 Sort input arrays get the sorted indices
 
-Sort a multi dimensional array and return sorted indices
+Sort a multi dimensional array and return sorted indices. Index array is of
+type u32.
 
 
 
diff --git a/docs/details/image.dox b/docs/details/image.dox
index 4e1b0a5..234f4f7 100644
--- a/docs/details/image.dox
+++ b/docs/details/image.dox
@@ -329,6 +329,9 @@ distance as well as the color distance.
 The bilateral filter requires the size of the filter (in pixels) and the upper
 bound on color values, N, where pixel values range from 0–N inclusively.
 
+The return type of the array is f64 for f64 input, f32 for all other input
+types.
+
 =======================================================================
 
 \defgroup image_func_erode erode
diff --git a/include/af/arith.h b/include/af/arith.h
index fc2cdc2..b5f6f17 100644
--- a/include/af/arith.h
+++ b/include/af/arith.h
@@ -578,7 +578,7 @@ extern "C" {
     /**
        C Interface for dividing an array by another
 
-       \param[out] out will contain result of \p lhs / \p rhs
+       \param[out] out will contain result of \p lhs / \p rhs. out is of type b8
        \param[in] lhs first input
        \param[in] rhs second input
        \param[in] batch specifies if operations need to be performed in batch mode
@@ -591,7 +591,7 @@ extern "C" {
     /**
        C Interface for checking if an array is less than another
 
-       \param[out] out will contain result of \p lhs < \p rhs
+       \param[out] out will contain result of \p lhs < \p rhs. out is of type b8
        \param[in] lhs first input
        \param[in] rhs second input
        \param[in] batch specifies if operations need to be performed in batch mode
@@ -604,7 +604,7 @@ extern "C" {
     /**
        C Interface for checking if an array is greater than another
 
-       \param[out] out will contain result of \p lhs > \p rhs
+       \param[out] out will contain result of \p lhs > \p rhs. out is of type b8
        \param[in] lhs first input
        \param[in] rhs second input
        \param[in] batch specifies if operations need to be performed in batch mode
@@ -617,7 +617,7 @@ extern "C" {
     /**
        C Interface for checking if an array is less or equal to another
 
-       \param[out] out will contain result of \p lhs <= \p rhs
+       \param[out] out will contain result of \p lhs <= \p rhs. out is of type b8
        \param[in] lhs first input
        \param[in] rhs second input
        \param[in] batch specifies if operations need to be performed in batch mode
@@ -630,7 +630,7 @@ extern "C" {
     /**
        C Interface for checking if an array is greater or equal to another
 
-       \param[out] out will contain result of \p lhs >= \p rhs
+       \param[out] out will contain result of \p lhs >= \p rhs. out is of type b8
        \param[in] lhs first input
        \param[in] rhs second input
        \param[in] batch specifies if operations need to be performed in batch mode
@@ -643,7 +643,7 @@ extern "C" {
     /**
        C Interface for checking if an array is equal to another
 
-       \param[out] out will contain result of \p lhs == \p rhs
+       \param[out] out will contain result of \p lhs == \p rhs. out is of type b8
        \param[in] lhs first input
        \param[in] rhs second input
        \param[in] batch specifies if operations need to be performed in batch mode
@@ -656,7 +656,7 @@ extern "C" {
     /**
        C Interface for checking if an array is not equal to another
 
-       \param[out] out will contain result of \p lhs != \p rhs
+       \param[out] out will contain result of \p lhs != \p rhs. out is of type b8
        \param[in] lhs first input
        \param[in] rhs second input
        \param[in] batch specifies if operations need to be performed in batch mode
@@ -669,7 +669,7 @@ extern "C" {
     /**
        C Interface for performing logical and on two arrays
 
-       \param[out] out will contain result of \p lhs && \p rhs
+       \param[out] out will contain result of \p lhs && \p rhs. out is of type b8
        \param[in] lhs first input
        \param[in] rhs second input
        \param[in] batch specifies if operations need to be performed in batch mode
@@ -682,7 +682,7 @@ extern "C" {
     /**
        C Interface for performing logical or on two arrays
 
-       \param[out] out will contain result of \p lhs || \p rhs
+       \param[out] out will contain result of \p lhs || \p rhs. out is of type b8
        \param[in] lhs first input
        \param[in] rhs second input
        \param[in] batch specifies if operations need to be performed in batch mode
@@ -695,7 +695,7 @@ extern "C" {
     /**
        C Interface for performing logical not on input
 
-       \param[out] out will contain result of logical not of \p in
+       \param[out] out will contain result of logical not of \p in. out is of type b8
        \param[in] in is the input
        \return \ref AF_SUCCESS if the execution completes properly
 
diff --git a/include/af/array.h b/include/af/array.h
index dc570fc..a5f39e7 100644
--- a/include/af/array.h
+++ b/include/af/array.h
@@ -1047,7 +1047,7 @@ namespace af
     /// \param[in] lhs the left hand side value of the operand
     /// \param[in] rhs the right hand side value of the operand
     ///
-    /// \returns an array with the equality operation performed on each element
+    /// \returns an array of type b8 with the equality operation performed on each element
     BIN_OP(operator==)
     /// @}
 
@@ -1058,7 +1058,7 @@ namespace af
     /// \param[in] lhs the left hand side value of the operand
     /// \param[in] rhs the right hand side value of the operand
     ///
-    /// \returns    an array with the != operation performed on each element
+    /// \returns    an array of type b8 with the != operation performed on each element
     ///             of \p lhs and \p rhs
     BIN_OP(operator!=)
     /// @}
@@ -1070,7 +1070,7 @@ namespace af
     /// \param[in] lhs the left hand side value of the operand
     /// \param[in] rhs the right hand side value of the operand
     ///
-    /// \returns    an array with the < operation performed on each element
+    /// \returns    an array of type b8 with the < operation performed on each element
     ///             of \p lhs and \p rhs
     BIN_OP(operator< )
     /// @}
@@ -1082,7 +1082,7 @@ namespace af
     /// \param[in] lhs the left hand side value of the operand
     /// \param[in] rhs the right hand side value of the operand
     ///
-    /// \returns    an array with the <= operation performed on each element
+    /// \returns    an array of type b8 with the <= operation performed on each element
     ///             of \p lhs and \p rhs
     BIN_OP(operator<=)
     /// @}
@@ -1094,7 +1094,7 @@ namespace af
     /// \param[in] lhs the left hand side value of the operand
     /// \param[in] rhs the right hand side value of the operand
     ///
-    /// \returns    an array with the > operation performed on each element
+    /// \returns    an array of type b8 with the > operation performed on each element
     ///             of \p lhs and \p rhs
     BIN_OP(operator> )
     /// @}
@@ -1106,7 +1106,7 @@ namespace af
     /// \param[in] lhs the left hand side value of the operand
     /// \param[in] rhs the right hand side value of the operand
     ///
-    /// \returns    an array with the >= operation performed on each element
+    /// \returns    an array of type b8 with the >= operation performed on each element
     ///             of \p lhs and \p rhs
     BIN_OP(operator>=)
     /// @}
@@ -1119,7 +1119,7 @@ namespace af
     /// \param[in] lhs the left hand side value of the operand
     /// \param[in] rhs the right hand side value of the operand
     ///
-    /// \returns    an array with a logical AND operation performed on each
+    /// \returns    an array of type b8 with a logical AND operation performed on each
     ///             element of \p lhs and \p rhs
     BIN_OP(operator&&)
     /// @}
@@ -1132,7 +1132,7 @@ namespace af
     /// \param[in] lhs the left hand side value of the operand
     /// \param[in] rhs the right hand side value of the operand
     ///
-    /// \returns    an array with a logical OR operation performed on each
+    /// \returns    an array of type b8 with a logical OR operation performed on each
     ///             element of \p lhs and \p rhs
     BIN_OP(operator||)
     /// @}
diff --git a/include/af/image.h b/include/af/image.h
index 1c16280..6c0ef76 100644
--- a/include/af/image.h
+++ b/include/af/image.h
@@ -230,7 +230,7 @@ AFAPI array bilateral(const array &in, const float spatial_sigma, const float ch
    \param[in]  nbins  Number of bins to populate between min and max
    \param[in]  minval minimum bin value (accumulates -inf to min)
    \param[in]  maxval minimum bin value (accumulates max to +inf)
-   \return     histogram array
+   \return     histogram array of type u32
 
    \ingroup image_func_histogram
  */
@@ -243,7 +243,7 @@ AFAPI array histogram(const array &in, const unsigned nbins, const double minval
 
    \param[in]  in is the input array
    \param[in]  nbins  Number of bins to populate between min and max
-   \return     histogram array
+   \return     histogram array of type u32
 
    \ingroup image_func_histogram
  */
@@ -796,7 +796,7 @@ extern "C" {
     /**
        C Interface for histogram
 
-       \param[out] out is the histogram for input array in
+       \param[out] out (type u32) is the histogram for input array in
        \param[in]  in is the input array
        \param[in]  nbins  Number of bins to populate between min and max
        \param[in]  minval minimum bin value (accumulates -inf to min)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git



More information about the debian-science-commits mailing list