root/oshmem/shmem/c/shmem_pe_accessible.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. shmem_pe_accessible

   1 /*
   2  * Copyright (c) 2013      Mellanox Technologies, Inc.
   3  *                         All rights reserved.
   4  * Copyright (c) 2019      Research Organization for Information Science
   5  *                         and Technology (RIST).  All rights reserved.
   6  * $COPYRIGHT$
   7  *
   8  * Additional copyrights may follow
   9  *
  10  * $HEADER$
  11  */
  12 
  13 #include "oshmem_config.h"
  14 
  15 #include <stdlib.h>
  16 
  17 #include "oshmem/constants.h"
  18 #include "oshmem/include/shmem.h"
  19 
  20 #include "oshmem/runtime/runtime.h"
  21 
  22 #if OSHMEM_PROFILING
  23 #include "oshmem/include/pshmem.h"
  24 #pragma weak shmem_pe_accessible = pshmem_pe_accessible
  25 #include "oshmem/shmem/c/profile/defines.h"
  26 #endif
  27 
  28 int shmem_pe_accessible(int pe)
  29 {
  30     RUNTIME_CHECK_INIT();
  31 
  32     /* Assume that everything between 0 and num_pes() is reachable. */
  33     return 0 <= pe && pe < _num_pes() ? 1 : 0;
  34 }
  35 

/* [<][>][^][v][top][bottom][index][help] */