1
1
openmpi/oshmem/shmem/c/shmem_addr_accessible.c
Mike Dubman ff384daab4 Added new project: oshmem.
This commit was SVN r28048.
2013-02-12 15:33:21 +00:00

31 строка
624 B
C

/*
* Copyright (c) 2012 Mellanox Technologies, Inc.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "oshmem_config.h"
#include "oshmem/constants.h"
#include "oshmem/include/shmem.h"
#include "oshmem/runtime/runtime.h"
#include "oshmem/mca/memheap/memheap.h"
int shmem_addr_accessible(void *addr, int pe)
{
uint64_t rva;
mca_spml_mkey_t *mkey;
RUNTIME_CHECK_INIT();
mkey = MCA_MEMHEAP_CALL(get_cached_mkey(pe, (unsigned long)addr,
oshmem_get_transport_id(pe), &rva));
return mkey ? 1 : 0;
}