1
1
openmpi/oshmem/mca/sshmem/base/sshmem_base_wrappers.c
Mike Dubman 323e4418b9 OSHMEM: extract memheap allocate methods into separate framework
- similar to opal/shmem
- next step is some refactoring and merge into opal/shmem
 Developed by Igor, reviewed by AlexM, MikeD

This commit fixes trac:4261.

This commit was SVN r30855.

The following Trac tickets were found above:
  Ticket 4261 --> https://svn.open-mpi.org/trac/ompi/ticket/4261
2014-02-26 16:32:23 +00:00

76 строки
1.8 KiB
C

/*
* Copyright (c) 2014 Mellanox Technologies, Inc.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "oshmem_config.h"
#include "opal/constants.h"
#include "oshmem/mca/sshmem/sshmem.h"
#include "oshmem/mca/sshmem/base/base.h"
/* ////////////////////////////////////////////////////////////////////////// */
int
mca_sshmem_segment_create(map_segment_t *ds_buf,
const char *file_name,
size_t size)
{
if (!mca_sshmem_base_selected) {
return OSHMEM_ERROR;
}
return mca_sshmem_base_module->segment_create(ds_buf, file_name, size);
}
/* ////////////////////////////////////////////////////////////////////////// */
int
mca_sshmem_ds_copy(const map_segment_t *from,
map_segment_t *to)
{
if (!mca_sshmem_base_selected) {
return OSHMEM_ERROR;
}
return mca_sshmem_base_module->ds_copy(from, to);
}
/* ////////////////////////////////////////////////////////////////////////// */
void *
mca_sshmem_segment_attach(map_segment_t *ds_buf, sshmem_mkey_t *mkey)
{
if (!mca_sshmem_base_selected) {
return NULL;
}
return mca_sshmem_base_module->segment_attach(ds_buf, mkey);
}
/* ////////////////////////////////////////////////////////////////////////// */
int
mca_sshmem_segment_detach(map_segment_t *ds_buf, sshmem_mkey_t *mkey)
{
if (!mca_sshmem_base_selected) {
return OSHMEM_ERROR;
}
return mca_sshmem_base_module->segment_detach(ds_buf, mkey);
}
/* ////////////////////////////////////////////////////////////////////////// */
int
mca_sshmem_unlink(map_segment_t *ds_buf)
{
if (!mca_sshmem_base_selected) {
return OSHMEM_ERROR;
}
return mca_sshmem_base_module->unlink(ds_buf);
}