void __shmem_fcollect_dispatch_init (void) { char *name = __shmem_comms_getenv ("SHMEM_FCOLLECT_ALGORITHM"); if (EXPR_LIKELY (name == (char *) NULL)) { name = default_implementation; } if (strcmp (name, "linear") == 0) { func32 = __shmem_fcollect32_linear; func64 = __shmem_fcollect64_linear; } else { ; /* error */ } /* * report which implementation we set up */ __shmem_trace (SHMEM_LOG_BROADCAST, "using collect \"%s\"", name); }
/** * check that the address is accessible to shmem on that PE * */ int shmemi_symmetric_addr_accessible (void *addr, int pe) { if (EXPR_LIKELY (shmemi_symmetric_addr_lookup (addr, pe) != NULL)) { return 1; } else { return 0; } }
/** * is the address one that can be accessed remotely? (self-inspection) * */ int shmemi_is_symmetric (void *addr) { if (EXPR_LIKELY (shmemi_symmetric_addr_lookup (addr, GET_STATE (mype)) != NULL)) { return 1; } else { return 0; } }