Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
exiting parfor loops

Subject: exiting parfor loops

From: audley james

Date: 19 Oct, 2011 06:15:11

Message: 1 of 2

hi,

can anyone suggest to me how is it possible to break from a parfor loop under some condition that I set?

The break command cannot be used for parfor loops.

cheers
audley

Subject: exiting parfor loops

From: Edric M Ellis

Date: 19 Oct, 2011 10:07:02

Message: 2 of 2

"audley james" <audleyer@gmail.com> writes:

> can anyone suggest to me how is it possible to break from a parfor
> loop under some condition that I set?
>
> The break command cannot be used for parfor loops.

Unfortunately, it's not possible to 'break' out of PARFOR loops because
this breaks the order-independence. ('break' implies that you have
executed all iterations up to some point - PARFOR executes iterations in
an arbitrary order).

Why do you want to do this?

Cheers,

Edric.

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us