Bridge++  Ver.2.1.3
afopr_common_th-inc.h
Go to the documentation of this file.
1 
10 #ifndef ACCEL_AFOPR_COMMON_TH_INC_INCLUDED
11 #define ACCEL_AFOPR_COMMON_TH_INC_INCLUDED
12 
13 
14 namespace {
15 
16 //====================================================================
17 // case (a): tasks are equally assgined to all threads
18 
19 inline void set_threadtask_afopr(int& ith, int& nth, int& is, int& ns,
20  const int size)
21 {
24 
25  is = size * ith / nth;
26  ns = size * (ith + 1) / nth;
27 
28 }
29 
30 } // nameless namespace end
31 #endif
32 //============================================================END=====
ThreadManager::get_num_threads
static int get_num_threads()
returns available number of threads.
Definition: threadManager.cpp:246
ThreadManager::get_thread_id
static int get_thread_id()
returns thread id.
Definition: threadManager.cpp:253