answersLogoWhite

0

A non touching loop is where each iteration does not access data from a different iteration. An optimizing compiler/interpreter can detect this, and spread out the loop between different threads, potentially (with multiple processors) running the loop faster.

An example of a non touching loop is the addition of two arrays. Each iteration accesses one element, and has no dependencies on elements accessed in different iterations.

An example of a touching loop is the summation of elements in an array. Each iteration depends on the result of a different, usually the prior, iteration. Even there, however, the optimization process can spread the work out amongst different threads so long as there are synchronization mechanisms in place.

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

Difference between deterministic and nondeterministic loop?

Deterministic and non-deterministic loops A deterministic loop is predictable. The number of iterations of such a loop are known in advance, even before the loop has started. Most counting loops are deterministic. Before they start, we can say how many times they will execute. A non-deterministic loop is not easily predicted. A loop that is driven by the response of a user is not deterministic, because we cannot predict the response of the user. Non-deterministic loops usually are controlled by a boolean and the number of iterations is not known in advance.


What is non nested loop?

Example: for (i=0; i<argc; ++i) { print ("%2d. '%s'\n', i, argv[i]); }


How do you fix an infinite loop?

It comes from its name: it doesn't terminate, the user have to interrupt the program-run (in the worst case: power off the computer).The infinite loop is also used to program loops with non-easily-deterministically end-of-loop conditions.You write an infinite loop, such as for (;;) {statements}, and break out of the loop with the break statement when ready to terminate.


What is loop logic structure?

I believe it is: Loop condition Loop actions And how the loop breaks


A variable declared inside the for loop control cannot be referenced outside the loop?

Yes. A variable declared inside the loop is a local variable for the code block enclosed by the {} statements of the for loop. The variable will not be available to be used by any code outside the code block.

Related Questions

Why is it necessary to touch a sterile part of the agar with the loop before touching the bacterial growth?

It is a way to check that the loop isn't hot since you flamed it just before. I have seen some actually sizzle.


Difference between deterministic and nondeterministic loop?

Deterministic and non-deterministic loops A deterministic loop is predictable. The number of iterations of such a loop are known in advance, even before the loop has started. Most counting loops are deterministic. Before they start, we can say how many times they will execute. A non-deterministic loop is not easily predicted. A loop that is driven by the response of a user is not deterministic, because we cannot predict the response of the user. Non-deterministic loops usually are controlled by a boolean and the number of iterations is not known in advance.


Why must the inoculating loop be cooled first before touching a culture?

To avoid killing the test subjects before the test can begin.


For battery to occur what must be the essential element?

non consensual touching


When getting inoculums from a slant why is it necessary to touch a sterile part of the agar with the loop before touching the bacterial growth?

It is a way to check that the loop isn't hot since you flamed it just before. I have seen some actually sizzle.


How do you remove the hitch from a yo-yo to make it sleep?

you un do every thing and just put the loop on and that a non-hitch, and how does the hitch look you un do every thing and just put the loop on and that a non-hitch, and how does the hitch look


What is non nested loop?

Example: for (i=0; i<argc; ++i) { print ("%2d. '%s'\n', i, argv[i]); }


How do you fix an infinite loop?

It comes from its name: it doesn't terminate, the user have to interrupt the program-run (in the worst case: power off the computer).The infinite loop is also used to program loops with non-easily-deterministically end-of-loop conditions.You write an infinite loop, such as for (;;) {statements}, and break out of the loop with the break statement when ready to terminate.


What causes guitar feedback when not touching the strings?

Guitar feedback occurs when the sound from the amplifier is picked up by the guitar's pickups and re-amplified, creating a loop of sound. This can happen even when not touching the strings due to the proximity of the pickups to the amplifier or other sources of sound.


What are some types of nonverbal behaviors?

a type of non-verbal behaviors is like touching -Triniti


What are the release dates for Loop Loop Loop Loop - 2014?

Loop Loop Loop Loop - 2014 was released on: USA: 15 February 2014


Why is gravitation a example of a non contact force?

Because gravity can pull on stuff without touching it. Ocean tides are caused by the Moon's gravity pulling on the water, and that sure isn't touching.