Ejemplo n.º 1
0
static void gpath_save_thread(void *arg)
{
  GPathSaver *wrkr = (GPathSaver*)arg;
  const dBGraph *db_graph = wrkr->db_graph;

  GPathSubset subset;
  StrBuf sbuf;

  gpath_subset_alloc(&subset);
  gpath_subset_init(&subset, &wrkr->db_graph->gpstore.gpset);
  strbuf_alloc(&sbuf, 2 * DEFAULT_IO_BUFSIZE);

  dBNodeBuffer nbuf;
  SizeBuffer jposbuf;
  db_node_buf_alloc(&nbuf, 1024);
  size_buf_alloc(&jposbuf, 256);

  HASH_ITERATE_PART(&db_graph->ht, wrkr->threadid, wrkr->nthreads,
                    _gpath_gzsave_node,
                    &sbuf, &subset,
                    wrkr->save_seq ? &nbuf : NULL, wrkr->save_seq ? &jposbuf : NULL,
                    wrkr->gzout, wrkr->outlock,
                    db_graph);

  _gpath_save_flush(wrkr->gzout, &sbuf, wrkr->outlock);

  db_node_buf_dealloc(&nbuf);
  size_buf_dealloc(&jposbuf);
  gpath_subset_dealloc(&subset);
  strbuf_dealloc(&sbuf);
}
Ejemplo n.º 2
0
static void run_exp_abc_thread(void *ptr, size_t threadid)
{
  ExpABCWorker *wrkr = (ExpABCWorker*)ptr;
  const dBGraph *db_graph = wrkr->db_graph;

  // // Start from each kmer, in each direction
  HASH_ITERATE_PART(&db_graph->ht, threadid, wrkr->nthreads,
                    test_statement_bkmer, wrkr);
}
Ejemplo n.º 3
0
static void infer_edges_worker(void *arg)
{
  InferEdgesWorker *wrkr = (InferEdgesWorker*)arg;
  size_t num_nodes_modified = 0;

  HASH_ITERATE_PART(&wrkr->db_graph->ht, wrkr->threadid, wrkr->nthreads,
                    infer_edges_node,
                    wrkr->add_all_edges, wrkr->db_graph,
                    &num_nodes_modified);

  wrkr->num_nodes_modified = num_nodes_modified;
}