示例#1
0
void
GOMP_parallel (void (*fn) (void *), void *data, unsigned num_threads, unsigned int flags)
{
  num_threads = gomp_resolve_num_threads (num_threads, 0);
  gomp_team_start (fn, data, num_threads, flags, gomp_new_team (num_threads));
  fn (data);
  ialias_call (GOMP_parallel_end) ();
}
void
GOMP_parallel_sections_start (void (*fn) (void *), void *data,
			      unsigned num_threads, unsigned count)
{
  struct gomp_team *team;

  num_threads = gomp_resolve_num_threads (num_threads, count);
  team = gomp_new_team (num_threads);
  gomp_sections_init (&team->work_shares[0], count);
  gomp_team_start (fn, data, num_threads, team);
}
示例#3
0
void
GOMP_parallel_start (void *fn, void *data, int num_threads)
{
  int nthr;
  unsigned int timer;
  /* The thread descriptor for slaves of the newly-created team */
#ifdef STATS_ENABLE
  timers[0] = stop_timer();
#endif
  gomp_team_t *new_team;  

  gomp_team_start (fn, data, num_threads, &new_team);

  MSlaveBarrier_Release(_ms_barrier, new_team->nthreads, new_team->proc_ids);


#ifdef STATS_ENABLE
  timers[7] = stop_timer();
#endif
}
示例#4
0
void
GOMP_parallel_start (void (*fn) (void *), void *data, unsigned num_threads)
{
  num_threads = gomp_resolve_num_threads (num_threads, 0);
  gomp_team_start (fn, data, num_threads, 0, gomp_new_team (num_threads));
}