Skip to content

Splitting a view for job threads #970

Answered by skypjack
iamdak asked this question in Q&A
Discussion options

You must be logged in to vote

If you want inner parallelism with your job system (opposed to outer parallelism, that is, running different systems that use different resources aka component types in parallel), I think the easiest approach to start with is something along this line:

  • Single component views are trivial, just get their iterators and sizes, split the range into multiple parts and spawn enough tasks to do the work
  • Multi component views can be reduced to the single type view case as it follows:
    • Get the handle and therefore its iterators and size
    • Split the range in multiple parts, spawn enough tasks and bind to them the original view
    • Iterate the subrange and check if the entity belongs to the view, if yes t…

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
1 reply
@Green-Sky
Comment options

Comment options

You must be logged in to vote
7 replies
@skypjack
Comment options

@untiedgames
Comment options

@iamdak
Comment options

@untiedgames
Comment options

@skypjack
Comment options

Answer selected by iamdak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
discussion it sounds interesting, let's discuss it
4 participants