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



Tim Prince wrote:
Dan wrote:


I have some legacy code which includes calls to the CAL2 vector mask
and vector population count instructions. Lacking a nearby Cray, does
anyone know of subroutines that implement these instructions?


Maybe it would help to show some of the code, if it isn't secret like much usage of popcount.
Apparently, GMP supports popcount for those processors which implement it.

The Intel manuals have MMX/SSE{1234} instructions which might work,
and AMD has the "something-now" which are apparently the same, but
I've not seen any demo code emulating the mask and popcount
instructions.

SSE popcount instruction isn't available in currently released hardware, but it will be along soon.

Wrong, it's in the original SSE4 supported by Penryn processors:
http://softwarecommunity.intel.com/articles/eng/1193.htm
(no compiler support, except for a C compatible library function).
.



Relevant Pages

  • Re: Any libraries for vector mask and vector population count?
    ... and vector population count instructions. ... Maybe it would help to show some of the code, if it isn't secret like much usage of popcount. ... SSE popcount instruction isn't available in currently released hardware, but it will be along soon. ... Fortran MERGE for SSE2 is vectorized with masks; the latest additions to SSE include more direct merge support. ...
    (comp.lang.fortran)
  • Re: Control Flow Analysis for Languages with Exceptions (e.g. Java)
    ... CFA, once you have the AST, is to determine what the basic blocks are ... instructions such that if any one of those instructions are executed, ... When exceptions are taken into account, ... Because of JSR subroutines, ...
    (comp.compilers)
  • Re: Programming languages for the very young
    ... >> You only need a conditional branch to get subroutines. ... It's not that mainframes don't have SUB- and RET-like instructions; ... It's the lack of stack support instructions in hardware that's different ...
    (comp.lang.java)
  • Re: Programming languages for the very young
    ... >> You only need a conditional branch to get subroutines. ... > subroutines are part of the stack machine model that just about every ... I'm not using the "native" subroutine instructions, ...
    (comp.lang.java)
  • IPDS PRPQ
    ... Good news for once! ... I asked if anyone in the group had instructions for using ... the subroutines which came originally with the Intelligent Printer Data ...
    (comp.sys.ibm.as400.misc)