Bridge++  Ver. 2.0.2
field_thread-inc.h
Go to the documentation of this file.
1 
10 #ifndef FIELD_THREAD_INC_INCLUDED
11 #define FIELD_THREAD_INC_INCLUDED
12 
14 
15 namespace {
16  // Equal tasks for all threads
17  inline void set_threadtask(int& ith, int& nth, int& is, int& ns,
18  const int size)
19  {
22 
23  size_t is2 = size_t(size) * size_t(ith) / nth;
24  size_t ns2 = size_t(size) * size_t(ith + 1) / nth;
25  is = int(is2);
26  ns = int(ns2);
27  }
28 }
29 
30 #endif
31 //============================================================END=====
ThreadManager::get_num_threads
static int get_num_threads()
returns available number of threads.
Definition: threadManager.cpp:246
threadManager.h
ThreadManager::get_thread_id
static int get_thread_id()
returns thread id.
Definition: threadManager.cpp:253