@@ -132,33 +132,13 @@ void Solver::varReorder()
132132bool Solver::LCVE ()
133133{
134134 // reorder variables
135- uint32* evars = vars->eligible ;
136- uint32* eend = evars + inf.maxVar ;
137- LOGN2 (2 , " Finding eligible variables for LCVE.." );
138- assert (cuhist.d_hist != NULL );
139- // NOTE: OT creation will be synced in calcScores call
140- if (vars->nUnits ) calcScores (vars, cuhist.d_hist , ot); // update d_hist & calc scores
141- else calcScores (vars, cuhist.d_hist );
142- cuhist.cacheHist (inf.nDualVars , streams[2 ]);
143- if (gopts.profile_gpu ) cutimer->start (streams[3 ]);
144- cacher.insert (cumm.scatter (), cumm.scatterCap ());
145- thrust::sort (thrust::cuda::par (tca).on (streams[3 ]), evars, eend, GPU_LCV_CMP (vars->scores ));
146- cacher.erase (cumm.scatterCap ());
147- LOGDONE (2 , 5 );
148- vars->nUnits = 0 ;
149- SYNC (streams[2 ]);
150- if (gopts.profile_gpu ) cutimer->stop (streams[3 ]), cutimer->vo += cutimer->gpuTime ();
151- if (verbose == 4 ) {
152- LOG0 (" Eligible variables:" );
153- for (uint32 v = 0 ; v < inf.maxVar ; v++) {
154- uint32 x = evars[v], p = V2L (x), n = NEG (p);
155- LOG1 (" e[%d]->(v: %d, p: %d, n: %d, s: %d)" , v, x, cuhist[p], cuhist[n], vars->scores [x]);
156- }
157- }
135+ varReorder ();
158136
159137 // extended LCVE
160138 LOGN2 (2 , " Electing variables (p-mu: %d, n-mu: %d).." , opts.mu_pos << multiplier, opts.mu_neg << multiplier);
161139 sp->stacktail = sp->tmpstack ;
140+ uint32* evars = vars->eligible ;
141+ uint32* eend = evars + inf.maxVar ;
162142 uint32*& tail = sp->stacktail ;
163143 LIT_ST * frozen = sp->frozen ;
164144 const uint32 maxoccurs = opts.lcve_max_occurs ;
0 commit comments