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
{
22
nth =
ThreadManager::get_num_threads
();
23
ith =
ThreadManager::get_thread_id
();
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
src
lib_alt_Accel
Fopr
afopr_common_th-inc.h
Generated on Thu Apr 16 2026 22:04:18 for Bridge++ by
1.8.17