Skip to content

Conversation

@suvorovrain
Copy link
Collaborator

todo

- graph is directed
- edges have no numbers
- "call" edges have been removed
- all input was deleted from "data"
folder and now it's hardcoded

Signed-off-by: Rodion Suvorov <[email protected]>
This patch brings following changes:
1) At this moment we didn't take any input,
so all matrices are hardcoded
2) All vectors now have GrB_Vector type
3) For every edge and veretex type have been
created corresponding GrB types
4) Add some go-style "err != nil"-driven-development

Signed-off-by: Rodion Suvorov <[email protected]>
This patch brings user filtration logic:
1) Build filter via vector assign and kronecker
product
2) Apply filter to matrix via assigning mask

Signed-off-by: Rodion Suvorov <[email protected]>
Signed-off-by: Rodion Suvorov <[email protected]>
@georgiy-belyanin
Copy link
Member

Hello, Rodion. Please, assign me as a reviewer for this PR.

@suvorovrain
Copy link
Collaborator Author

Hello, Rodion. Please, assign me as a reviewer for this PR.

done

src/main.c Outdated
return info;
}

int main()
Copy link
Member

Choose a reason for hiding this comment

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

Nit: consider using getopt() (https://www.opennet.ru/man.shtml?topic=getopt&category=3&russian=0) or so. It might appear cooler if the example appear as a complete CLI utility tool.

Copy link
Collaborator Author

@suvorovrain suvorovrain Nov 11, 2025

Choose a reason for hiding this comment

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

later 🙃

Comment on lines 62 to 67
void check_user_age(bool *z, const User *x, GrB_Index _i, GrB_Index _j, const uint8_t *y) // EdgeOwns
{
{
*z = (x->age > *y);
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Nit: assertions/default values are usually handy there. You know it is ok not to pass an argument to IndexUnaryOps and y is completely ok to be null.

GrB_IndexUnaryOp user_age;
TRY(GrB_IndexUnaryOp_new(&user_age, (GxB_index_unary_function)&check_user_age, GrB_BOOL, user, GrB_UINT8));
uint8_t age = 30;
TRY(GrB_Vector_apply_IndexOp_UDT(v, NULL, NULL, user_age, users, &age, NULL));
Copy link
Member

Choose a reason for hiding this comment

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

Везде честный select. Не забыть, что операции тоже поменяются.

@suvorovrain
Copy link
Collaborator Author

  • Change apply to select
  • Fix corresponding binops
  • Naming

1) Remove redundant check of type of the graph (always directed)
2) Add mask of subgraph

Signed-off-by: Rodion Suvorov <[email protected]>
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.

4 participants