1 /* 2 * Copyright (C) by Argonne National Laboratory 3 * See COPYRIGHT in top-level directory 4 */ 5 6 #ifndef CH4_PROC_H_INCLUDED 7 #define CH4_PROC_H_INCLUDED 8 9 #include "ch4_impl.h" 10 MPIDI_rank_is_local(int rank,MPIR_Comm * comm)11MPL_STATIC_INLINE_PREFIX int MPIDI_rank_is_local(int rank, MPIR_Comm * comm) 12 { 13 int ret; 14 MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_RANK_IS_LOCAL); 15 MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_RANK_IS_LOCAL); 16 17 #ifdef MPIDI_CH4_DIRECT_NETMOD 18 /* Ask the netmod for locality information. If it decided not to build it, 19 * it will call back up to the MPIDIU function to get the infomration. */ 20 ret = MPIDI_NM_rank_is_local(rank, comm); 21 #else 22 ret = MPIDIU_rank_is_local(rank, comm); 23 #endif 24 25 MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_RANK_IS_LOCAL); 26 return ret; 27 } 28 MPIDI_av_is_local(MPIDI_av_entry_t * av)29MPL_STATIC_INLINE_PREFIX int MPIDI_av_is_local(MPIDI_av_entry_t * av) 30 { 31 int ret; 32 33 MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_AV_IS_LOCAL); 34 MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_AV_IS_LOCAL); 35 36 #ifdef MPIDI_CH4_DIRECT_NETMOD 37 /* Ask the netmod for locality information. If it decided not to build it, 38 * it will call back up to the MPIDIU function to get the infomration. */ 39 ret = MPIDI_NM_av_is_local(av); 40 #else 41 ret = MPIDIU_av_is_local(av); 42 #endif 43 44 MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_AV_IS_LOCAL); 45 return ret; 46 } 47 48 #endif /* CH4_PROC_H_INCLUDED */ 49