Bridge++  Ver.2.1.3
afield_th-inc.h
Go to the documentation of this file.
1 
10 #ifndef ACCEL_AFIELD_TH_INC_H
11 #define ACCEL_AFIELD_TH_INC_H
12 
13 namespace {
14 
15 //====================================================================
16 inline void set_thread(int& ith, int& nth)
17 {
20 }
21 
22 //====================================================================
23 inline void set_threadtask(int& ith, int& nth, int& is, int& ns,
24  const int size)
25 {
28 
29  size_t is2 = size_t(size) * size_t(ith) / nth;
30  size_t ns2 = size_t(size) * size_t(ith + 1) / nth;
31  is = int(is2);
32  ns = int(ns2);
33 
34 }
35 
36 //====================================================================
37 
38 } // nameless namespace end
39 #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