-
aoclsparse_status aoclsparse_copy(const aoclsparse_matrix src, const aoclsparse_mat_descr descr, aoclsparse_matrix *dest)#
Creates a copy of source aoclsparse_matrix.
aoclsparse_copycreates a deep copy of source aoclsparse_matrix (hints and optimized data are not copied). Matrix should be destroyed using aoclsparse_destroy(). aoclsparse_convert_csr() can also be used to create a copy of the source matrix while converting it in CSR format.- Parameters:
src – [in] the source aoclsparse_matrix to copy.
descr – [in] the source matrix descriptor, this argument is reserved for future releases and it will not be referenced.
dest – [out] pointer to the newly allocated copied aoclsparse_matrix.
- Return values:
aoclsparse_status_success – the operation completed successfully.
aoclsparse_status_invalid_pointer –
src,destor internal pointers are invalid. or dest points to src.aoclsparse_status_memory_error – memory allocation for matrix failed.
aoclsparse_status_invalid_value –
srcmatrix type is invalid.aoclsparse_status_wrong_type –
srcmatrix data type is invalid.