28INT thread_ini_flag = 0;
40INT fasp_get_num_threads (
void )
44 if ( thread_ini_flag == 0 ) {
47 nthreads = omp_get_num_threads();
49 printf(
"\nFASP is running on %d thread(s).\n\n", nthreads);
68INT fasp_set_num_threads (
const INT nthreads)
70 omp_set_num_threads( nthreads );
98 INT chunk_size = n / nprocs;
100 INT start_loc, end_loc;
103 end_loc = chunk_size + 1;
104 start_loc = end_loc * procid;
107 end_loc = chunk_size;
108 start_loc = end_loc * procid + mod;
110 end_loc = end_loc + start_loc;
void fasp_get_start_end(const INT procid, const INT nprocs, const INT n, INT *start, INT *end)
Assign Load to each thread.
void fasp_set_gs_threads(const INT mythreads, const INT its)
Set threads for CPR. Please add it at the begin of Krylov OpenMP method function and after iter++.
Main header file for the FASP project.