answersLogoWhite

0

What is non touching loop?

Updated: 11/5/2022
User Avatar

Wiki User

14y ago

Best Answer

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

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is non touching loop?
Write your answer...
Submit
Still have questions?
magnify glass
imp
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

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 before touching a culture?

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


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

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


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.


For battery to occur what must be the essential element?

non consensual touching


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.


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.


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


What is a non ending line?

Both ends of the line must join together, as in a circle, loop, or a closed figure.