The Daily CLAD

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Re: LabVIEW Compiler Optimizations

SercoSteveB
Active Participant

What do the hash marks on wires shown in the VI below indicate?

Hash Lines.bmp

a) LabVIEW has created a reference to this section of code

b) LabVIEW has constant folded this section of code.

c) LabVIEW has identified this section of code for buffer reuse

d) LabVIEW has performed compile-time inlining on this section of code

Comments
crossrulz
Knight of NI

B

Just so people know, there's a setting in the options menu to turn that on or off.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Kumarhatti
Member

hey crossrulz

                    can you give brief explaination for this question.

crossrulz
Knight of NI

Constant folding is an optimization method.  In simple terms, when compiling LabVIEW is turning that whole code into a constant and indicator (a constant 15 wired into the x+y indicator in this case).  It makes things run faster.  The hash marks on the wires shows where LabVIEW is performing this optimization.  You need to be careful about these.  I've had constant folding into an array and the file becomes to large.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
MrStevenUND
Member

I haven't seen this before.  What version of LabVIEW was this first released in?

crossrulz
Knight of NI

At least as far as 8.2.1 (that's the oldest version I have here).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
MrStevenUND
Member

Interesting.    I'm using 8.2, 8.6.1, and 2009 SP1.  I've never seen it. (granted, this is poor coding and should be avoided)

crossrulz
Knight of NI

The showing of the constant folding is OFF by default.  If you go into the Options dialog and then to the Block Diagram tab, you will find the Show Constant Folding for wires and another one for structures.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
SercoSteveB
Active Participant

I see it all the time, my BDs are just one big blur

I can't get the structure constant folding to work (LV 2009).  Any thoughts?

taper
Member

Should add that LabVIEW performs the constant folding whether or not you show it.  The option is strictly UI.


--Using LV8.2, 8.6, 2009, 2012--
mini09
Active Participant

Learned a new stuff but need more on documents on this question. Nice explanation Crossrulz.

SercoSteveB
Active Participant

Answer: B.  Nice one crossrulz

I recommend checking out LabVIEW compiler optimizations and what is happening in the DFIR and LLVM, awesome page on ni.com. here.

adiveppa
Member

Ans is B