10 #ifndef QXS_MULT_COMMON_TH_INCLUDED
11 #define QXS_MULT_COMMON_TH_INCLUDED
23 inline void set_threadtask(
int& ith,
int& nth,
int& is,
int& ns,
29 is = size * ith / nth;
30 ns = size * (ith + 1) / nth;
83 inline void set_threadtask_without_master(
int& ith,
int& nth,
int& is,
int& ns,
87 nth = omp_get_num_threads();
88 ith = omp_get_thread_num();
102 int ith_tmp = ith - 1;
103 int nth_tmp = nth - 1;
108 is = size * (ith_tmp - 1) / (nth_tmp - 1);
109 if (ith_tmp == 1) is = 0;
110 ns = size * ith_tmp / (nth_tmp - 1);