} kmp_cancel_kind_t;
#endif // OMP_40_ENABLED
-#if KMP_MIC
extern unsigned int __kmp_place_num_cores;
extern unsigned int __kmp_place_num_threads_per_core;
extern unsigned int __kmp_place_core_offset;
-#endif
/* ------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------ */
extern int __kmp_zero_bt; /* whether blocktime has been forced to zero */
#endif /* KMP_ADJUST_BLOCKTIME */
#ifdef KMP_DFLT_NTH_CORES
-extern int __kmp_ncores; /* Number of physical procs in HT machine */
+extern int __kmp_ncores; /* Total number of cores for threads placement */
#endif
extern int __kmp_abort_delay; /* Number of millisecs to delay on abort for VTune */
#undef ADD_MASK
#undef ADD_MASK_OSID
-
-# if KMP_MIC
-
static void
__kmp_apply_thread_places(AddrUnsPair **pAddr, int depth)
{
if ( __kmp_place_num_threads_per_core == 0 ) {
__kmp_place_num_threads_per_core = __kmp_nThreadsPerCore; // use all HW contexts
}
- if ( __kmp_place_core_offset + __kmp_place_num_cores > nCoresPerPkg ) {
+ if ( __kmp_place_core_offset + __kmp_place_num_cores > (unsigned int)nCoresPerPkg ) {
KMP_WARNING( AffThrPlaceManyCores );
return;
}
int i, j, k, n_old = 0, n_new = 0;
for ( i = 0; i < nPackages; ++i ) {
for ( j = 0; j < nCoresPerPkg; ++j ) {
- if ( j < __kmp_place_core_offset || j >= __kmp_place_core_offset + __kmp_place_num_cores ) {
+ if ( (unsigned int)j < __kmp_place_core_offset || (unsigned int)j >= __kmp_place_core_offset + __kmp_place_num_cores ) {
n_old += __kmp_nThreadsPerCore; // skip not-requested core
} else {
for ( k = 0; k < __kmp_nThreadsPerCore; ++k ) {
- if ( k < __kmp_place_num_threads_per_core ) {
+ if ( (unsigned int)k < __kmp_place_num_threads_per_core ) {
newAddr[n_new] = (*pAddr)[n_old]; // copy requested core' data to new location
n_new++;
}
*pAddr = newAddr; // replace old topology with new one
}
-# endif /* KMP_MIC */
-
static AddrUnsPair *address2os = NULL;
static int * procarr = NULL;
return;
}
-# if KMP_MIC
__kmp_apply_thread_places(&address2os, depth);
-# endif
//
// Create the table of masks, indexed by thread Id.
void __kmpc_place_threads(int nC, int nT, int nO)
{
-#if KMP_MIC
if ( ! __kmp_init_serial ) {
__kmp_serial_initialize();
}
__kmp_place_num_cores = nC;
__kmp_place_num_threads_per_core = nT;
__kmp_place_core_offset = nO;
-#endif
}
// end of file //
int __kmp_affinity_num_places = 0;
#endif
-#if KMP_MIC
unsigned int __kmp_place_num_cores = 0;
unsigned int __kmp_place_num_threads_per_core = 0;
unsigned int __kmp_place_core_offset = 0;
-#endif
kmp_tasking_mode_t __kmp_tasking_mode = tskm_task_teams;
#endif // KMP_USE_ADAPTIVE_LOCKS
-#if KMP_MIC
// -------------------------------------------------------------------------------------------------
// KMP_PLACE_THREADS
// -------------------------------------------------------------------------------------------------
*/
}
}
-#endif
#if USE_ITT_BUILD
// -------------------------------------------------------------------------------------------------
{ "KMP_SPECULATIVE_STATSFILE", __kmp_stg_parse_speculative_statsfile,__kmp_stg_print_speculative_statsfile, NULL, 0, 0 },
#endif
#endif // KMP_USE_ADAPTIVE_LOCKS
-#if KMP_MIC
{ "KMP_PLACE_THREADS", __kmp_stg_parse_place_threads, __kmp_stg_print_place_threads, NULL, 0, 0 },
-#endif
#if USE_ITT_BUILD
{ "KMP_FORKJOIN_FRAMES", __kmp_stg_parse_forkjoin_frames, __kmp_stg_print_forkjoin_frames, NULL, 0, 0 },
{ "KMP_FORKJOIN_FRAMES_MODE", __kmp_stg_parse_forkjoin_frames_mode,__kmp_stg_print_forkjoin_frames_mode, NULL, 0, 0 },