I'm doing with parallel programming project. The requirement is to search a list of string in a lattice of cube (3D-dimension and maximum is 1000 elements). The max size of list is 1000 and the max length of string is 100.
I create 3 ForkTask: search in X-Dimension(NxN 2D-array), in Y-Dimension(NxN 2D-array), in Z-Dimension(NxN 2D-array). For each Task, I start searching the string in 2D-array and I create a ForkTask for this. I had a function to search a string in 2D-array.
I see that I have a lot of ForkTask as well as thread. To improve the search performance and time reduction, I check that if a task.join() is true, I will cancel the rest of tasks.
Is it a wise approach? Anyone can give me any recommendation or suggestion or advice?
Thanks