#Is there a way for ensuring order on parallel jobs?
1 messages · Page 1 of 1 (latest)
Generally you don't split work like this and instead parallelize it by doing a separate mesh per thread
Hmmmm, I currently I have 3 Jobs, one counts vertices, the other counts triangles and the last job is supposed to set Vertex Positions based on the results of the previous 2 jobs , how would I go for pretermining indexes?
i'm surprised vert and face counting is separate?
you can usually determine 1 from other
Yes, in this case I was doing experiments but I can merge those in a single job for sure
But still, I have not quite managed to determine the same order for the vertices on a parallel list
I am doing a MInecraft-Like chunk generator, I already go this working on a non parallel job system but was looking for improving it on a parallel one
This is the result of missalign of native list data (in this case float3)
I am using AddNoResize for adding these positions, but I have seen there is AddRangeNoResize, I have never used pointers so I don´t know how that is any different to AddNoResize, could that be the way to go?
yeah see if you have chunks
it makes sense to do 1 chunk per thread
rather than splitting that chunk up over multiple threads
So I should have a single job for handling all I need?
doesn't have to be 1 job
depends what you're doing
side note/fun fact: https://www.youtube.com/watch?v=ULdGzhRoO1M
minecraft style chunks was one of the first things i ever experimented with in entities
over 4 years ago
I see, Hmmm, currently I am doing a chunk per thread, it works just fine using non parallel jobs
I only lose data order on native lists
if you're doing a chunk per thread i'm not sure what you're merging then?
each chunk should have its own list
Hmmmm, maybe that´s what I am experiencing right now, I am using persistent nativelIst through the whole program and clear it once another chunk is being generated