@@ -217,7 +217,7 @@ extern "C" {
217217
218218 /*! \brief clsparseControl keeps OpenCL state like kernel execution,
219219 * memory allocation and synchronization behavior
220- * \details Struct implementation hidden to clients using C PIMPL idiom
220+ * \details Struct implementation hidden to clients using C PIMPL idiom
221221 * to make private to library
222222 */
223223 typedef struct _clsparseControl * clsparseControl ;
@@ -227,17 +227,16 @@ extern "C" {
227227 */
228228 typedef struct _clsparseCreateResult
229229 {
230- clsparseStatus status ;
231- clsparseControl control ;
230+ clsparseStatus status ; /*!< Returned error code */
231+ clsparseControl control ; /*!< Returned control object that abstracts clsparse state */
232232 } clsparseCreateResult ;
233233
234234 /*!
235- * \brief setup the clsparse control object from external OpenCL queue
235+ * \brief Setup the clsparse control object from external OpenCL queue
236236 *
237237 * \param[in] queue cl_command_queue created
238- * \param[out] status clsparse error return value from function
239238 *
240- * \returns \b On successful completion, a valid clsparseControl object
239+ * \returns \b A clsparseCreateResult which contains a return code and result handle
241240 *
242241 * \ingroup STATE
243242 */
@@ -276,18 +275,16 @@ extern "C" {
276275 */
277276 typedef struct _clsparseEventResult
278277 {
279- clsparseStatus status ;
280- cl_event event ;
278+ clsparseStatus status ; /*!< Returned error code */
279+ cl_event event ; /*!< Returned event object client can synchronize with */
281280 } clsparseEventResult ;
282281
283282 /*!
284283 * \brief Return an event from the last kernel execution
285284 *
286285 * \param[in] control A valid clsparseControl created with clsparseCreateControl
287- * \param[out] event The returned event for the last kernel queued into the cl_command_queue inside the
288- * clsparseControl object
289286 *
290- * \returns \b clsparseSuccess
287+ * \returns \b A clsparseEventResult which contains a return code and result handle
291288 *
292289 * \ingroup STATE
293290 */
@@ -352,8 +349,8 @@ extern "C" {
352349 */
353350 typedef struct _clsparseCreateSolverResult
354351 {
355- clsparseStatus status ;
356- clSParseSolverControl control ;
352+ clsparseStatus status ; /*!< Returned error code */
353+ clSParseSolverControl control ; /*!< Returned control object that abstracts clsparse state */
357354 } clsparseCreateSolverResult ;
358355
359356 /*!
@@ -614,22 +611,20 @@ extern "C" {
614611 clsparseDCsrMatrixfromFile ( clsparseCsrMatrix * csrMatx , const char * filePath , clsparseControl control , cl_bool read_explicit_zeroes );
615612
616613 /*! \brief A structure returned by value from the clsparseCsrMetaSize
617- * function. This serves as a result/status pair for the size of the
614+ * function. This serves as a result/status pair for the size of the
618615 * meta data associated with a sparse matrix.
619616 */
620617 typedef struct _clsparseMetaSizeResult
621618 {
622- clsparseStatus status ;
623- clsparseIdx_t metaSize ;
619+ clsparseStatus status ; /*!< Returned error code */
620+ clsparseIdx_t metaSize ; /*!< Returned size of the memory needed to store meta data */
624621 } clsparseMetaSizeResult ;
625622
626623 /*!
627624 * \brief Calculate the amount of device memory required to hold meta-data for csr-adaptive SpM-dV algorithm
628625 * \details CSR-adaptive is a high performance sparse matrix times dense vector algorithm. It requires a pre-processing
629626 * step to calculate meta-data on the sparse matrix. This meta-data is stored alongside and carried along
630- * with the other matrix data. This function initializes the rowBlockSize member variable of the csrMatx
631- * variable with the appropriate size. The client program is responsible to allocate device memory in rowBlocks
632- * of this size before calling into the library compute routines.
627+ * with the other matrix data.
633628 * \param[in,out] csrMatx The CSR sparse structure that represents the matrix in device memory
634629 * \param[in] control A valid clsparseControl created with clsparseCreateControl
635630 *
@@ -639,11 +634,11 @@ extern "C" {
639634 clsparseCsrMetaSize ( clsparseCsrMatrix * csrMatx , clsparseControl control );
640635
641636 /*!
642- * \brief Calculate the meta-data for csr-adaptive SpM-dV algorithm
637+ * \brief Allocate memory and calculate the meta-data for csr-adaptive SpM-dV algorithm
643638 * \details CSR-adaptive is a high performance sparse matrix times dense vector algorithm. It requires a pre-processing
644639 * step to calculate meta-data on the sparse matrix. This meta-data is stored alongside and carried along
645- * with the other matrix data. This function calculates the meta data and stores it into the rowBlocks member of
646- * the clsparseCsrMatrix.
640+ * with the other matrix data. This function allocates memory for the meta- data and initializes it with proper values.
641+ * It is important to remember to deallocate the meta memory with clsparseCsrMetaDelete
647642 * \param[in,out] csrMatx The CSR sparse structure that represents the matrix in device memory
648643 * \param[in] control A valid clsparseControl created with clsparseCreateControl
649644 * \note This function assumes that the memory for rowBlocks has already been allocated by client program
@@ -657,7 +652,6 @@ extern "C" {
657652 * \brief Delete meta data associated with a CSR encoded matrix
658653 * \details Meta data for a sparse matrix may occupy device memory, and this informs the library to release it
659654 * \param[in,out] csrMatx The CSR sparse structure that represents the matrix in device memory
660- * \note This function assumes that the memory for rowBlocks has already been allocated by client program
661655 *
662656 * \ingroup FILE
663657 */
0 commit comments