Skip to content
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

Work graph construction ease-of-use #991

Closed
hcedwar opened this issue Jul 27, 2017 · 2 comments
Closed

Work graph construction ease-of-use #991

hcedwar opened this issue Jul 27, 2017 · 2 comments
Assignees
Labels
Enhancement Improve existing capability; will potentially require voting
Milestone

Comments

@hcedwar
Copy link
Contributor

hcedwar commented Jul 27, 2017

Constructing the WorkGraphPolicies Crs data structure requires a count-allocate-fill pattern.
An ease-of-use interface could accept a user's fill-lambda, apply a dry run of that lambda to count, then allocate, then apply the lambda again to fill.

@hcedwar hcedwar added the Enhancement Improve existing capability; will potentially require voting label Jul 27, 2017
@hcedwar hcedwar added this to the Backlog milestone Jul 27, 2017
@hcedwar hcedwar added this to Backlog in On-node Task DAG Jul 27, 2017
@ibaned
Copy link
Contributor

ibaned commented Jul 27, 2017

Need to prevent user lambda from filling before there is anything to fill. Proposed concept:

IndexType user_lambda(IndexType work_item, bool fill, CrsType const& graph) {
  IndexType count = 0;
  for (faces) {
    if (is_dependent(face)) {
      ++count;
      if (fill) graph.entries(graph.row_map(work_item) + count) = next_work_item;
    }
  }
  return count;
}

@hcedwar
Copy link
Contributor Author

hcedwar commented Jul 27, 2017

Even simpler:

  [=]( int work_item , int * fill ) {
    int count = 0 ;
    for ( faces ) {
      if ( is_dependent(face) ) {
        if ( fill ) fill[count] = other_work_item(face);
        ++count ;
      }
    }
    return count ;
  }

@ibaned ibaned self-assigned this Jul 27, 2017
ibaned added a commit that referenced this issue Jul 28, 2017
ibaned added a commit that referenced this issue Aug 1, 2017
@hcedwar hcedwar moved this from Backlog to In Develop in On-node Task DAG Aug 8, 2017
@hcedwar hcedwar modified the milestones: 2017-September (mid), Backlog Aug 8, 2017
@ibaned ibaned closed this as completed Aug 16, 2017
@hcedwar hcedwar moved this from In Develop to Done in On-node Task DAG Sep 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improve existing capability; will potentially require voting
Projects
No open projects
Development

No branches or pull requests

2 participants