Bridge++
Ver. 2.0.2
afield_th-inc.h
Go to the documentation of this file.
1
10
#ifndef QXS_AFIELD_TH_INCLUDED
11
#define QXS_AFIELD_TH_INCLUDED
12
13
namespace
{
14
//====================================================================
15
inline
void
set_threadtask(
int
& ith,
int
& nth,
int
& is,
int
& ns,
16
const
int
size)
17
{
18
nth =
ThreadManager::get_num_threads
();
19
ith =
ThreadManager::get_thread_id
();
20
21
size_t
is2 = size_t(size) * size_t(ith) / nth;
22
size_t
ns2 = size_t(size) * size_t(ith + 1) / nth;
23
is = int(is2);
24
ns = int(ns2);
25
}
26
27
28
//====================================================================
29
}
// namespace
30
31
#endif
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_QXS
inline_General
afield_th-inc.h
Generated on Sat Feb 10 2024 14:20:01 for Bridge++ by
1.8.17