-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
query a matrix, vector, or scalar if GrB_wait will do anything to it #75
Comments
I think adding this functionality is a good idea. As I understand, what you're essentially asking is whether the function call Given the API already includes the term "complete" for this, you might also consider Another bit of prior art to consider is the syntax used by futures, including C++'s |
I want an API that minimizes cognitive load on our users. Hence, something closely aligned with what we have already make sense.
We already have GrB_wait(A, GrB_COMPLETE). This returns once A is in the state GrB_COMPLETE). I suggest a perturbation of that:
GrB_test_wait(A, GrB_COMPLETE)
This function always returns immediately. The return value will tell you if its COMPLETE or not. This name is easier for a programmer working with GraphBLAS to remember since it’s a slight perturbation from an existing function.
…--Tim
|
Currently, my I don't need a
If there were a |
RedisGraph requires a method to query a matrix, vector, or scalar to see if it has any pending operations. That is, it returns true
Roi (@swilly22) has one solution: DrTimothyAldenDavis/GraphBLAS#172 . This proposed method has signature (for the GrB_Matrix case):
GrB_Info GxB_Matrix_pending (GrB_Matrix A, bool *has_pending_operations) ;
An alternative would be to include this query in GrB_get, as the _Generic signature:
GrB_Info GrB_get (GrB_Matrix A, GrB_Something whatever, bool *has_pending_operations) ;
where "whatever" would be an enum value like "GrB_PENDING" or "GrB_WILL_WAIT" or whatever.
Any thoughts? Can you consider this for the v2.1 C API?
The text was updated successfully, but these errors were encountered: