kClistCore.c
void oneshortpass(sparse *g, bheapLLU* heap, unsigned kmax, unsigned u, unsigned long long *nck){
	unsigned i,v,s=0;
	static unsigned *merge=NULL,*size,*ck,*adj;
	if (merge==NULL){
		merge=malloc((kmax-2)*g->core*sizeof(unsigned));
		size=malloc((kmax-2)*sizeof(unsigned));
		ck=malloc(kmax*sizeof(unsigned));
		adj=malloc(g->n2*sizeof(unsigned));
	}

	for (i=g->cd0[u];i<g->cd0[u+1];i++){
		v=g->adj0[i];
		if (heap->pt[v]!=-1){
			adj[s++]=v;
		}
	}

	if (s>kmax-2){
		ck[0]=u;
		for (i=0;i<s;i++){
			ck[1]=adj[i];
			size[0]=merging(adj,s,&(g->adj[g->cd[ck[1]]]),g->d[ck[1]],merge);
			recursion(kmax,3,merge,size,g,ck,nck);
		}
	}

}
//one pass over all k-cliques
one pass over all k-cliques
one pass over all k - cliques
void oneshortpass(sparse *g, bheapLLU* heap, unsigned kmax, unsigned u, unsigned long long *nck){
	unsigned i,v,s=0;
	static unsigned *merge=NULL,*size,*ck,*adj;
	if (merge==NULL){
		merge=malloc((kmax-2)*g->core*sizeof(unsigned));
		size=malloc((kmax-2)*sizeof(unsigned));
		ck=malloc(kmax*sizeof(unsigned));
		adj=malloc(g->n2*sizeof(unsigned));
	}
	for (i=g->cd0[u];i<g->cd0[u+1];i++){
		v=g->adj0[i];
		if (heap->pt[v]!=-1){
			adj[s++]=v;
		}
	}
	if (s>kmax-2){
		ck[0]=u;
		for (i=0;i<s;i++){
			ck[1]=adj[i];
			size[0]=merging(adj,s,&(g->adj[g->cd[ck[1]]]),g->d[ck[1]],merge);
			recursion(kmax,3,merge,size,g,ck,nck);
		}
	}
}
void oneshortpass ( sparse * g , bheapLLU * heap , unsigned kmax , unsigned u , unsigned long long * nck ) { unsigned i , v , s = 0 ; static unsigned * merge = NULL , * size , * ck , * adj ; if ( merge == NULL ) { merge = malloc ( ( kmax - 2 ) * g -> core * sizeof ( unsigned ) ) ; size = malloc ( ( kmax - 2 ) * sizeof ( unsigned ) ) ; ck = malloc ( kmax * sizeof ( unsigned ) ) ; adj = malloc ( g -> n2 * sizeof ( unsigned ) ) ; } for ( i = g -> cd0 [ u ] ; i < g -> cd0 [ u + 1 ] ; i ++ ) { v = g -> adj0 [ i ] ; if ( heap -> pt [ v ] != -1 ) { adj [ s ++ ] = v ; } } if ( s > kmax - 2 ) { ck [ 0 ] = u ; for ( i = 0 ; i < s ; i ++ ) { ck [ 1 ] = adj [ i ] ; size [ 0 ] = merging ( adj , s , & ( g -> adj [ g -> cd [ ck [ 1 ] ] ] ) , g -> d [ ck [ 1 ] ] , merge ) ; recursion ( kmax , 3 , merge , size , g , ck , nck ) ; } } }
one pass over all k-cliques
one pass over all k - cliques