Lines Matching refs:ntbl
63 ssize_t ntbl; /* number of coding tables */
150 grp->ntbl = 0;
225 /* compute an optimal clustering with ntbl clusters */
227 static void grppart(Group_t* grp, ssize_t ntbl, int niter)
229 static void grppart(grp, ntbl, niter)
231 ssize_t ntbl; /* # of tables aiming for */
244 if(ntbl > npts)
245 ntbl = npts;
246 if(ntbl > GRP_NTBL)
247 ntbl = GRP_NTBL;
249 if(grp->ntbl <= 0 || ntbl < grp->ntbl) /* making new tables */
256 for(z = npts/ntbl, p = 0, t = 0; t < ntbl; t += 1)
270 { /**/DEBUG_ASSERT(ntbl <= GRP_NTBL && grp->ntbl <= GRP_NTBL);
271 memcpy(tbl,grp->tbl,grp->ntbl*sizeof(Table_t));
272 n = ntbl - grp->ntbl; ntbl = grp->ntbl;
274 { for(z = 0, p = -1, i = 0; i < grp->ntbl; ++i)
283 q = ntbl; ntbl += 1;
301 /**/DEBUG_PRINT(2,"\tgrppart: #table aiming for=%d\n",ntbl);
305 for(k = 0; k < ntbl; ++k)
324 for(bestz = GRP_HUGE, bestt = -1, k = 0; k < ntbl; ++k)
341 for(p = k = 0; k < ntbl; ++k)
354 if(p < ntbl) /* tables were moved, reset part indexes */
356 { /**/DEBUG_ASSERT(work[i] < ntbl);
360 ntbl = p;
364 for(k = 0; k < ntbl; ++k)
380 if(ntbl > 1) /* add the cost of encoding the indices */
392 grp->ntbl = 0;
397 { grp->ntbl = ntbl;
400 memcpy(grp->tbl, tbl, ntbl*sizeof(Table_t));
403 if(ntbl == 1 || iter >= niter || (iter > 1 && z >= p-64) )
404 { /**/DEBUG_PRINT(2,"\t\t#table=%d ",grp->ntbl);
441 ssize_t *sz, npts, ntbl, ptsz, itbl;
477 if(grp->ntbl == 0) /* single table, simplify */
484 tbl = grp->tbl; ntbl = grp->ntbl;
487 n_output = (ntbl+1)*(VCH_SIZE+8) + (grp->cmpsz+7)/8;
493 vcioputu(&io, ntbl);
497 for(k = 0; k < ntbl; ++k)
559 ssize_t npts, ptsz, ntbl;
583 if((ntbl = (ssize_t)vciogetu(&io)) < 0) /* # of coding tables */
588 for(k = 0; k < ntbl; ++k)