* @brief Get the sum of an array - for parameter checking * @return The sum * @note The caller will ensure that ah is always non-null. **/
| 148 | * @note The caller will ensure that ah is always non-null. |
| 149 | **/ |
| 150 | static int32_t __sum(ArrayHandle<int32_t> ah){ |
| 151 | const int32_t * array = ah.ptr(); |
| 152 | size_t size = ah.size(); |
| 153 | return std::accumulate(array, array + size, static_cast<int32_t>(0)); |
| 154 | } |
| 155 | |
| 156 | /** |
| 157 | * @brief This function learns the topics of words in a document and is the |