Execution of Two Independent parfor Loops in the Same Code
    4 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Kareem Elgindy
 el 16 de Abr. de 2022
  
    
    
    
    
    Respondida: Matt J
      
      
 el 16 de Abr. de 2022
            Suppose we have the following two independent parfor loops within the same code:
parfor i = 1:a
    bla bla bla
end
parfor j = 1:b
    bla bla bla
end
Will MATLAB parallel computing toolbox run both parfor loops above simulataneously, or it will run the second only after completing the first? Assume that the bodies of both parfor loops are independent.
0 comentarios
Respuesta aceptada
  Matt J
      
      
 el 16 de Abr. de 2022
        The second loop will be run only after the first is complete. 
It's not really clear how running simultaneously would even be possible. If the iterations of both loops were mutually independent, you wouldn't have had two loops to begin wtih.
0 comentarios
Más respuestas (0)
Ver también
Categorías
				Más información sobre Loops and Conditional Statements en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

