Timeline for Speed up Reaction-Diffusion simulation calculations in Unity
Current License: CC BY-SA 4.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 14, 2022 at 5:49 | vote | accept | silverfox | ||
Apr 13, 2022 at 19:42 | answer | added | Philipp | timeline score: 1 | |
Apr 12, 2022 at 12:33 | vote | accept | silverfox | ||
Apr 13, 2022 at 15:36 | |||||
Apr 12, 2022 at 11:52 | history | edited | silverfox | CC BY-SA 4.0 |
Add to question
|
Apr 12, 2022 at 10:05 | comment | added | silverfox | Let us continue this discussion in chat. | |
Apr 12, 2022 at 10:04 | comment | added | Philipp | Have you considered to use two separate persistent matrices "current" and "next" and then after each iteration simply switch their meanings, so the next becomes the current and the current becomes the next without actually copying anything? That way you could avoid copying and reallocation. | |
Apr 12, 2022 at 9:59 | comment | added | silverfox |
@Philipp I mean I (think I) could create global NativeArray<> (s) and do everything with just NativeArray<> that is declared with Allocator.Persistent , but I'd have to rewrite a lot of the code 'cause I have to flatten the matrixes etc... and IMO I just don't like the general idea.
|
|
Apr 12, 2022 at 9:59 | comment | added | silverfox |
@Philipp problem is, I have a normal List<List<Vector2>> current, next that everything take information from. So the general process looks like: Copy info from current to NativeArray<> -> Get all JobHandle into a list of some sort and call CompleteAll -> Copy back info from NativeArray<> to next . So since nested NativeArray aren't allow, I don't know how to dispose of the NativeArray<> created in step 1.
|
|
Apr 12, 2022 at 9:51 | comment | added | Philipp |
Then why not pass those as three separate NativeArray<float2> ?
|
|
Apr 12, 2022 at 9:47 | comment | added | silverfox | @Philipp yes, exactly. That's the main point of the problem. | |
Apr 12, 2022 at 9:46 | comment | added | Philipp | When I understand this correctly, this method requires three rows: previous, current and next. Is that correct? | |
S Apr 12, 2022 at 9:33 | review | First questions | |||
Apr 12, 2022 at 12:34 | |||||
S Apr 12, 2022 at 9:33 | history | asked | silverfox | CC BY-SA 4.0 |