21#include "fasp_functs.h"
29INT thread_ini_flag = 0;
41INT fasp_get_num_threads (
void )
45 if ( thread_ini_flag == 0 ) {
48 nthreads = omp_get_num_threads();
50 printf(
"\nFASP is running on %d thread(s).\n\n", nthreads);
69INT fasp_set_num_threads (
const INT nthreads)
71 omp_set_num_threads( nthreads );
99 INT chunk_size = n / nprocs;
100 INT mod = n % nprocs;
101 INT start_loc, end_loc;
104 end_loc = chunk_size + 1;
105 start_loc = end_loc * procid;
108 end_loc = chunk_size;
109 start_loc = end_loc * procid + mod;
111 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.