PAQ8/PaqCtxMap.hpp
// Construct using m bytes of memory for c contexts
Construct using m bytes of memory for c contexts
Construct using m bytes of memory for c contexts
ContextMap(int m, int c=1): C(c), t(m>>6), cp(c), cp0(c), cxt(c), runp(c), cn(0) {    
  ASSERT(m>=64 && (m&m-1)==0);  
  ASSERT(sizeof(E)==64);
  sm=new StateMap[C];
  for (int i=0; i<C; ++i) {
    cp0[i]=cp[i]=&t[0].bh[0][0];
    runp[i]=cp[i]+3;
  }
}
ContextMap ( int m , int c = 1 ) : C ( c ) , t ( m >> 6 ) , cp ( c ) , cp0 ( c ) , cxt ( c ) , runp ( c ) , cn ( 0 ) { ASSERT ( m >= 64 && ( m & m - 1 ) == 0 ) ; ASSERT ( sizeof ( E ) == 64 ) ; sm = new StateMap [ C ] ; for ( int i = 0 ; i < C ; ++ i ) { cp0 [ i ] = cp [ i ] = & t [ 0 ] . bh [ 0 ] [ 0 ] ; runp [ i ] = cp [ i ] + 3 ; } }
Construct using m bytes of memory for c contexts
Construct using m bytes of memory for c contexts
// m = memory in bytes, a power of 2, C = c // power of 2?