Re: Any libraries for vector mask and vector population count?



Dan wrote:
...
For those lucky enough not to have to program in CAL, S registers are
scalar, V are vector, T are transfer, A and B are data registers, This
code was originally written for a Cray-1, so it is simpler than X and
Y assembler. The code is uncommented deliberately. Sorry about that.

All it does is the same as the Fortran-90 PACK intrinsic. Just use
the intrinsic. If it isn't fast enough, complain to your compiler
vendor.

And it won't work on a Cray-1. It uses the compressed index and hardware
gather instructions. Which means mid-life X-MP, onwards.

The Cray compilers were eventually able to vectorize this idiom
automatically. The CAL routine was unnecessary, and probably slower
than letting the compiler generate inline code.

W.
.



Relevant Pages

  • Re: switching context on MSP430
    ... registers R15,R14,R13 and R12on stack. ... are you aware that not every c compiler for the MSP430 ... Preemption vs Cooperation ... Another important decision to make is whether or not a real-time clock ...
    (comp.arch.embedded)
  • Re: Ive seen the future...and it works! (was: my view on this assembler is blah)
    ... The compiler has the advantage, granted, that it can "remember" what all ... the registers are...but "remembering" isn't the challenge here, ... registers with the CPU... ... The HLLs, though - shackled by a whole bunch of factors that they have to ...
    (alt.lang.asm)
  • Ive seen the future...and it works! (was: my view on this assembler is blah)
    ... > though the registers are few. ... And the 64 bit CPU designers ... what my Borland _C++ compiler_ does when you ask for assembly output...it ... out programming with something like BASIC or Pascal, ...
    (alt.lang.asm)
  • Re: 32-bit vs. 64-bit x86 Speed
    ... You compiler people probably have intimate knowledge of the ISA ... What is the underlying chip architecture and memory subsystem? ... Do you use the x87 floating point stack or xmm registers? ... Do you use of tuned math and string libraries? ...
    (comp.compilers)
  • Attitudes (was: Some stack questions)
    ... On a register-starved architecture like the Intel x86, ... > compiler allocates registers efficiently so that most operations ... > Parentheses are part of the syntax, and allow the compiler to more ...
    (comp.lang.c.moderated)