Table Of Contents

In Place Element Structure (G Dataflow)

Version:
Last Modified: January 12, 2018

Decreases memory usage and increases program efficiency when you work with data value references or with large arrays or clusters.

Use this structure when you want to operate on a data element within an array, cluster, or data value reference without requiring the compiler to copy data values and maintain those values in memory. You can also use this structure to operate on any data type that you want to maintain in a single data space in memory.

Programming Patterns
terminal_icon

Read Data Value Reference Element

Reads a data value from a data value reference. Use this border node to operate on the data without creating copies of that data.

This border node provides serialized access to the reference you wire to the structure. When part of a program obtains access to the reference, the structure blocks the rest of the program or other programs from simultaneous access. If you attempt to access a reference twice at the same time in the same structure, the structure returns an error. If you attempt to access the reference after you obtain access inside the In Place Element Structure, the program might hang.

Use a New Data Value Reference node to create a data value reference to wire to this border node.

If a data value reference points to an object, code inside the In Place Element Structure can change the values of the object's private data fields, but the code must preserve the type of the object. In general, you cannot replace the object inside the data value reference with another object. If a data value reference points to a cluster or an array, objects within those containers do not have this restriction.

terminal_icon

Write Data Value Reference Element

Replaces the data in the data value reference you wire to Read Data Value Reference Element with the data value you wire to this border node. Use this border node to operate on the data without creating copies of that data.

If a data value reference points to an object, code inside the In Place Element Structure can change the values of the object's private data fields, but the code must preserve the type of the object. In general, you cannot replace the object inside the data value reference with another object. If a data value reference points to a cluster or an array, objects within those containers do not have this restriction.

terminal_icon

Array Index

Returns the value stored in an array at a specified index.

Use this border node to perform operations on an element or elements of an array and return the elements to the same location or locations in the array. Because each element you index with the border node on the left side of the structure must be placed back into the array with the border node on the right side of the structure, you must wire the element back into the array.

This border node allows the compiler to avoid making a complete value copy of the array and array elements in memory, which conserves memory resources and increases program efficiency.

terminal_icon

Replace Elements

Replaces an element or subarray in an array at the index you specify.

Use this border node to perform operations on an element or elements of an array and return the elements to the same location or locations in the array. Because each element you index with the border node on the left side of the structure must be placed back into the array with the border node on the right side of the structure, you must wire the element back into the array.

This border node allows the compiler to avoid making a complete value copy of the array and array elements in memory, which conserves memory resources and increases program efficiency.

terminal_icon

Unbundle Elements

Allows you to read the elements of a cluster.

Use this border node to perform operations on one or more cluster elements and replace the elements in the same location in the cluster. Each cluster element you unbundle with the border node on the left side of the structure must be bundled back into the cluster with the border node on the right side of the structure.

This node allows the compiler to avoid storing a complete value copy of the cluster and cluster elements in memory, which conserves memory resources and increases program efficiency.

terminal_icon

Bundle Elements

Replaces one or more elements of a cluster.

Use this border node to perform operations on one or more cluster elements and replace the elements in the same location in the cluster. Each cluster element you unbundle with the border node on the left side of the structure must be bundled back into the cluster with the border node on the right side of the structure.

This node allows the compiler to avoid storing a complete value copy of the cluster and cluster elements in memory, which conserves memory resources and increases program efficiency.

terminal_icon

Tunnel

Point through which data enters or exits a structure.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application


Recently Viewed Topics