Jump to content

  • Log In with Google      Sign In   
  • Create Account

operation inside operations


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 lomateron   Members   -  Reputation: 363

Like
0Likes
Like

Posted 19 September 2012 - 06:31 AM

for example can i do this
dot(v1,normalize(v2));
what are the limits in operations inside operations, i mean how many operations inside operations until it stops working.

Edited by lomateron, 19 September 2012 - 06:35 AM.


Sponsor:

#2 L. Spiro   Crossbones+   -  Reputation: 14232

Like
0Likes
Like

Posted 19 September 2012 - 06:53 AM

The answer that is of benefit to you is that there is no limit.
Don’t think too hard about what follows.

The actual answer is that it depends on how the compiler was built. If it traverses the syntax tree recursively, the limit could be around 400,000 or so depending on the size of the stack of the compiler’s traversal thread.
If the compiler uses an explicit stack, the limit would be around 50,000,000 for x86 machines and virtually no limit for x64 machines.

Don’t think too hard about my secondary answer either because 50,000,000 implies operations inside operations only on one side. Meaning only the ride-side operation is nested this deep. If the left is nested only 3 deep, it would not mean you approach the limit by 3.

So, again, for all intents and purposes, there is no limit.


L. Spiro

Edited by L. Spiro, 19 September 2012 - 07:01 AM.

It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#3 CryZe   Members   -  Reputation: 768

Like
0Likes
Like

Posted 19 September 2012 - 06:53 AM

There's no limit. The limit is when your hard drive can't store the shader anymore xD. But you should still make sure that your code is still readable.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS