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



James Van Buskirk wrote:

(snip)

Oh yeah, the code that kills gfortran is like this:

integer(C_INT8_T), parameter :: IBITC(0:65535) = [( &
ibits(i,0,1)+ibits(i,1,1)+ibits(i,2,1)+ibits(i,3,1)+ &
ibits(i,4,1)+ibits(i,5,1)+ibits(i,6,1)+ibits(i,7,1)+ &
ibits(i,8,1)+ibits(i,9,1)+ibits(i,10,1)+ibits(i,11,1)+ &
ibits(i,12,1)+ibits(i,13,1)+ibits(i,14,1)+ibits(i,15,1), &
i=0,65535)]
(snip)

gcc version 4.4.0 20080404 (experimental) (GCC)

C:\gfortran\clf\popcnt>C:\gcc_equation\bin\x86_64-pc-mingw32-gfortran -c popcnt1
6.f90
popcnt16.f90: In function 'popcnt16':
popcnt16.f90:20: internal compiler error: in gfc_conv_array_initializer, at fort

Maybe a stack overflow trying to store the whole thing.

How about as a DATA statement instead of PARAMETER?

This reminds me of limits on the size of static arrays with a
C compiler on the Alpha. (Probably the DEC compiler, though it
might have been gcc.)

-- glen

.