Skip to content

Conversation

@FlorentinD
Copy link
Contributor

based on #8.

This PR also uses the redundant code-lines for handling of GrB_ALL. So refactoring this part into a seperate function in C would be really useful.

(This is my latest state)

FlorentinD added 7 commits September 18, 2020 13:23
}
}

// behavior of "GrB_assign"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these supposed to be commented?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added those, as the testGrBMatrixAssign method was not used otherwise. However these are failing, so thats why I commented them out.
I will have a look, why they are failing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getting some GrB_DIMENSION_MISMATCH, but don't see the cause (my hunch was that the into matrix needs to have the same dimensions as mat but thats not resolving it).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a FIXME and removed the test-cases for now.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I'll merge and try to understand what's happening.
Maybe it's a bug with assign

GRBOPSMAT.select(out, null, null, selectOp, mat, null, null) shouldBe GRBCORE.GrB_SUCCESS

// check could be improved
mt.vals.filter(p => (p._1 == p._2)).size shouldBe GRBCORE.nvalsMatrix(out)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use extract from SparseMatrixHandler then simple equals against the filtered mt.vals you've got here

GrB_Descriptor d = desc != NULL ? (GrB_Descriptor) (*env)->GetDirectBufferAddress(env, desc) : NULL;

long res = check_grb_error(GrB_assign(out, m, acc, first, I, grb_nj, J, grb_nj, d));
long res = check_grb_error(GrB_assign(out, m, acc, first, I, grb_ni, J, grb_nj, d));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good one, I don't know how this didn't show up in tests

public static int GxB_MODE = 2; // mode passed to GrB_init (blocking or non-blocking)
public static int GxB_THREAD_SAFETY = 3; // thread library that allows GraphBLAS to be thread-safe for user threads.
public static int GxB_THREADING = 4; // thread library used for internal GraphBLAS threads
//public static int GxB_LIBRARY_NAME = 8; // name of the library (char *)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the comments?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you also mean the comments describing the fields or just the unsupported fields?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just the unsupported fields

Copy link
Owner

@fabianmurariu fabianmurariu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fabianmurariu fabianmurariu merged commit c38ca8b into fabianmurariu:master Sep 23, 2020
@FlorentinD FlorentinD deleted the vectorOps branch September 24, 2020 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants