Closed DrTimothyAldenDavis closed 2 years ago
In the latest update to GrB_Matrix_deserialize and GrB_Matrix_serialize: the parameters are jumbled. The serialized_data and serialized_size parameters appear in different orders in each method. In GrB_Matrix_build and GrB_Matrix_extractTuples, an array comes first followed by the size of the array.
In the updated GrB_Matrix_deserialize, the size comes first followed by the array. The GrB_Matrix_serialize uses the pattern in the rest of GrB* methods: the array comes first, followed by its size.
GrB_Matrix_deserialize is an outlier. The parameters "serialized_size" and "serialize_data" should be swapped.
The same pattern holds for GrB_extract and GrB_assign, for the integer index arrays. The arrays come first, followed by their size.
GrB_Matrix_deserialize is an outlier. The parameters "serialized_size" and "serialize_data" should be swapped.
You're right. Just swapped the order of the parameters in GrB_Matrix_deserialize
to make them consistent.
Great!
I propose this signature for GrB_Matrix_serialize:
but that assumes that I malloc the blob which is later freed by the user. If you don't want that then this would also work:
Please add the descriptor so I can use it (as GxB at least) to select compression methods and levels to use. Compression is important.
For GrB_Matrix_deserialize, I propose:
I'd like a descriptor setting that tells me if the blob is trusted. If it is, the deserialize is faster. If it can come from an untrusted source, then I can do more exhaustive checks to ensure the resulting matrix is valid.
If passing matrices between MPI processes, serialize/deserialize should be as fast as possible, so the blob can be trusted. If reading the blob from a file that is known to be created by the same person, it can be trusted. But if a blob comes from outside, it shouldn't be trusted and I should do more costly checks on it.