Jump to content

How do some array operation work?


bublina

Recommended Posts

I have noticed, that some array operations come for free in some cases, e.g. do not cost any resources, such as: reverse, transpose, reshape. Since the array representation in memory is like:

 

dimension1

dimension2

...

dimensionx

data

 

I can see how things like reshape are for free, but how does for example reverse happen? Does LabVIEW keep these as flags in places with data or does the compiler just know that the next loop should start from back?

Edited by bublina
Link to comment

I always heard transpose was "like a no-op" because it didn't move the data around, it just swapped pointer to the memory.  If that were the case I could see why a reshape would also be free because the memory it self doesn't need to change just the way the data is interpreted.  That being said I have no source stating a transpose is a free operation.

Link to comment

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.