05-15-2013 08:07 AM
@Yamaeda wrote:
Nice tweak to mine, haven't thought about Logical shift being able to take arrays. 😄
/Y
Yeah, but won't both be folded to equal constants in real code?
05-15-2013 09:19 AM - edited 05-15-2013 09:21 AM
@Yamaeda wrote:
Nice tweak to mine, haven't thought about Logical shift being able to take arrays. 😄
/Y
Well there is no real difference in diagram size, and the compiler might even generate the same code for both versions (not sure). 😄
A benchmark would be interesting... (Yes aboud folding by placing a control on N).
For truly gigantic arrays, the first version can be parallelized while the second version might be abe to take better advantage of SIMD instructions. (?)
05-15-2013 09:29 AM
@altenbach wrote:
@Yamaeda wrote:
Nice tweak to mine, haven't thought about Logical shift being able to take arrays. 😄
/Y
Well there is no real difference in diagram size, and the compiler might even generate the same code for both versions (not sure). 😄
A benchmark would be interesting... (Yes aboud folding by placing a control on N).
For truly gigantic arrays, the first version can be parallelized while the second version might be abe to take better advantage of SIMD instructions. (?)
Not that likely. Aren't rotations prohibited in SSE?
(Over my head here- but, allways learning!)
05-15-2013 09:37 AM
@JÞB wrote:
Not that likely. Aren't rotations prohibited in SSE?
I have no idea, that's why I said "might". (here's a list of instructions, so I guess you are right)... 😉
05-16-2013 02:23 PM
Hey guys.
As some people here know, I'm not that experienced in LabVIEW.
Some time ago I needed to do a function (subroutine) that had to split a string received from a serial buffer into several substrings. My token is a comma ( , ).
This is used to read sensors information from a certain firmware. As you can see below, I'd have to change the number of substrings (our firmware documentation provides that) in every single application (since this is a minor monitoring system, we use lots of them).
Before...
... and after ...
The thing here is:
I feel really stupid.
There's somehow to improve this new function (and make me feel more stupid)?
By the way, really nice thread. I was browsing the answers in a spare time yesterday, and I could see very good tips and tricks.
Regards
05-16-2013 02:33 PM
05-16-2013 02:39 PM
I don't see what you are pointing, exactly.
Can you please post a snippet? I'd be happy 😄
Regards
05-16-2013 02:50 PM - edited 05-16-2013 02:50 PM
Like this.
05-16-2013 02:51 PM
05-16-2013 02:57 PM - edited 05-16-2013 02:59 PM
Well, if you want to retain the same functionality (cluster output!) use what I do in the top part.
(your code is at the bottom unchanged. Both give the same result)