Skip to main content

Timeline for How to parallelize this code?

Current License: CC BY-SA 3.0

13 events
when toggle format what by license comment
Dec 20, 2015 at 16:39 vote accept haijiaxuan
Dec 20, 2015 at 16:39 vote accept haijiaxuan
Dec 20, 2015 at 16:39
Dec 19, 2015 at 1:27 vote accept haijiaxuan
Dec 20, 2015 at 16:39
Dec 18, 2015 at 20:10 answer added Simon Woods timeline score: 2
Dec 18, 2015 at 17:58 answer added xzczd timeline score: 3
Dec 18, 2015 at 14:53 history edited haijiaxuan CC BY-SA 3.0
edited title
Dec 18, 2015 at 14:44 history edited haijiaxuan CC BY-SA 3.0
added 675 characters in body
Dec 18, 2015 at 14:38 comment added haijiaxuan @xzczd I forgot to put a Total before Boole, the rest part of the code inside Do is simply separating a into a1 and a2, where a1 contains all ice and it's neighbor, and a2 contains all the other cells.
Dec 18, 2015 at 14:33 history edited haijiaxuan CC BY-SA 3.0
added 6 characters in body
Dec 18, 2015 at 12:12 comment added xzczd You're trying to get better performance or simply play with parallelism? BTW your original code contains mistake, Boole[{a[[i, j]] >= alpha, a[[i, j + 1]] >= alpha, a[[i, j - 1]] >= alpha, a[[i + 1, j]] >= alpha, a[[i + 1, j + 1]] >= alpha, a[[i + 1, j - 1]] >= alpha, a[[i - 1, j]] >= alpha, a[[i - 1, j + 1]] >= alpha, a[[i - 1, j - 1]] >= alpha}] >= 0 won't work as you wished. (If you still don't understand what's wrong, try Boole[{True, False}] >= 0.) Also, I don't think the rest part of the code inside Do is the correct interpretation of your description.
Dec 18, 2015 at 7:01 comment added user9660 Welcome to Mathematica.SE! 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour and check the faqs! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign!
Dec 18, 2015 at 7:00 review First posts
Dec 18, 2015 at 7:02
Dec 18, 2015 at 6:54 history asked haijiaxuan CC BY-SA 3.0