Jump to content

In Place Structure


EJW

Recommended Posts

This is probably not the right way of using inplace element. It is design for working with element/structure which has the same size at both the input and output. Operations such as modifying data element within array, swap data between array indexies...without creating an extra memory

buffer, hence performance is improved.

Building a new array based on the data from the inplace element (IPE) input node will not help as you are increasing the size of the IPE output, as the result, LV still has to organize buffer for the operation described.

Link to post

QUOTE (Minh Pham @ Nov 20 2008, 06:52 PM)

This is probably not the right way of using inplace element. It is design for working with element/structure which has the same size at both the input and output. Operations such as modifying data element within array, swap data between array indexies...without creating an extra memory

buffer, hence performance is improved.

Building a new array based on the data from the inplace element (IPE) input node will not help as you are increasing the size of the IPE output, as the result, LV still has to organize buffer for the operation described.

Actually, i am replacing the third element with new data, same size. I keep the first two indexes and input a new third array to replace the original.

Link to post

QUOTE (EJW @ Nov 21 2008, 09:43 AM)

Actually, i am replacing the third element with new data, same size. I keep the first two indexes and input a new third array to replace the original.

I think the problem is that you're using the Build Array to create a completely new array - not working on the old one. Why not use the Replace Subset function?

Link to post

QUOTE (EJW @ Nov 21 2008, 06:43 AM)

Actually, i am replacing the third element with new data, same size. I keep the first two indexes and input a new third array to replace the original.

asbo has it right. You aren't telling the LV compiler any more than you were telling us, and we didn't understand either. You have to throw it a bone.

Put another way, you may know that the array will stay the same size, but the LabVIEW compiler has to generate code which will always work, no matter what you may have dropped into the local variable at some point.

Once you do the right thing and use replace subset, you don't need the inplace compiler hint anymore, because the Replace function always operates inplace.

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.