"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "saga-gis/src/saga_core/saga_api/api_core.cpp" between
saga-7.6.2_src.zip and saga-7.6.3_src.zip

About: SAGA (System for Automated Geoscientific Analyses) is a Geographic Information System (GIS) software for geodata processing and analysis. All source codes.

api_core.cpp  (saga-7.6.2_src):api_core.cpp  (saga-7.6.3_src)
skipping to change at line 78 skipping to change at line 78
//--------------------------------------------------------- //---------------------------------------------------------
#ifdef _OPENMP #ifdef _OPENMP
#include <omp.h> #include <omp.h>
//--------------------------------------------------------- //---------------------------------------------------------
int g_SG_OMP_Max_Num_Threads = omp_get_num_procs(); int g_SG_OMP_Max_Num_Threads = omp_get_num_procs();
//--------------------------------------------------------- //---------------------------------------------------------
void SG_OMP_Set_Max_Num_Threads (int iCores) void SG_OMP_Set_Max_Num_Threads (int iCores)
{ {
if( iCores < 1 ) if( iCores < 1 )
{ {
iCores = 1; iCores = 1;
} }
else if( iCores > omp_get_num_procs() ) else if( iCores > omp_get_num_procs() )
{ {
iCores = omp_get_num_procs(); iCores = omp_get_num_procs();
} }
omp_set_num_threads(g_SG_OMP_Max_Num_Threads = iCores); omp_set_num_threads(g_SG_OMP_Max_Num_Threads = iCores);
} }
//--------------------------------------------------------- //---------------------------------------------------------
int SG_OMP_Get_Max_Num_Threads (void) int SG_OMP_Get_Max_Num_Threads (void)
{ {
return( g_SG_OMP_Max_Num_Threads ); return( g_SG_OMP_Max_Num_Threads );
} }
//--------------------------------------------------------- //---------------------------------------------------------
int SG_OMP_Get_Max_Num_Procs (void) int SG_OMP_Get_Max_Num_Procs (void)
{ {
return( omp_get_num_procs() ); return( omp_get_num_procs() );
} }
//--------------------------------------------------------- //---------------------------------------------------------
int SG_OMP_Get_Thread_Num (void)
{
return( omp_get_thread_num() );
}
//---------------------------------------------------------
#else #else
void SG_OMP_Set_Max_Num_Threads (int iCores) {} void SG_OMP_Set_Max_Num_Threads (int iCores) {}
int SG_OMP_Get_Max_Num_Threads (void) { return( 1 ); } int SG_OMP_Get_Max_Num_Threads (void) { return( 1 ); }
int SG_OMP_Get_Max_Num_Procs (void) { return( 1 ); } int SG_OMP_Get_Max_Num_Procs (void) { return( 1 ); }
int SG_OMP_Get_Thread_Num (void) { return( 0 ); }
#endif #endif
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
// // // //
// // // //
// // // //
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
//--------------------------------------------------------- //---------------------------------------------------------
CSG_String SG_Data_Type_Get_Name (TSG_Data_Type Type) CSG_String SG_Data_Type_Get_Name (TSG_Data_Type Type)
 End of changes. 5 change blocks. 
3 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)