Ticket #50958: graph_blockmodel_overlap.hh.patch
File graph_blockmodel_overlap.hh.patch, 2.0 KB (added by essandess (Steve Smith), 9 years ago) |
---|
-
./graph_blockmodel_overlap.hh
old new 1287 1287 VLprop cv, VVprop vmap, Vprop clabel, 1288 1288 vector<int64_t>& vlist, vector<int64_t>& block_list, 1289 1289 bool deg_corr, bool dense, bool multigraph, double beta, 1290 Vprop vweight, Graph& g, bool sequential, bool parallel ,1290 Vprop vweight, Graph& g, bool sequential, bool parallel_enabled, 1291 1291 bool random_move, double c, size_t niter, size_t B, 1292 1292 bool verbose, RNG& rng, double& S, size_t& nmoves) 1293 1293 { … … 1297 1297 S = 0; 1298 1298 1299 1299 if (vlist.size() < 100) 1300 parallel = false;1300 parallel_enabled = false; 1301 1301 1302 1302 vector<pair<vertex_t, double> > best_move; 1303 1303 vector<rng_t*> rngs; 1304 if (parallel )1304 if (parallel_enabled) 1305 1305 { 1306 1306 best_move.resize(num_vertices(g), make_pair(vertex_t(0), numeric_limits<double>::max())); 1307 1307 … … 1334 1334 1335 1335 int i = 0, N = vlist.size(); 1336 1336 #pragma omp parallel for default(shared) private(i) \ 1337 firstprivate(m_entries) schedule(runtime) if (parallel )1337 firstprivate(m_entries) schedule(runtime) if (parallel_enabled) 1338 1338 for (i = 0; i < N; ++i) 1339 1339 { 1340 1340 size_t tid = 0; 1341 if (parallel )1341 if (parallel_enabled) 1342 1342 { 1343 1343 #ifdef USING_OPENMP 1344 1344 tid = omp_get_thread_num(); … … 1464 1464 1465 1465 if (accept) 1466 1466 { 1467 if (!parallel )1467 if (!parallel_enabled) 1468 1468 { 1469 1469 1470 1470 assert(b[v] == int(r)); … … 1488 1488 } 1489 1489 } 1490 1490 1491 if (parallel )1491 if (parallel_enabled) 1492 1492 { 1493 1493 for (vertex_t v : vlist) 1494 1494 { … … 1512 1512 } 1513 1513 } 1514 1514 1515 if (parallel )1515 if (parallel_enabled) 1516 1516 { 1517 1517 for (auto r : rngs) 1518 1518 delete r;