1 /*
2 * Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
3 * University Research and Technology
4 * Corporation. All rights reserved.
5 * Copyright (c) 2004-2005 The University of Tennessee and The University
6 * of Tennessee Research Foundation. All rights
7 * reserved.
8 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9 * University of Stuttgart. All rights reserved.
10 * Copyright (c) 2004-2005 The Regents of the University of California.
11 * All rights reserved.
12 * Copyright (c) 2010 Sandia National Laboratories. All rights reserved.
13 * $COPYRIGHT$
14 *
15 * Additional copyrights may follow
16 *
17 * $HEADER$
18 */
19
20 #ifndef OMPI_MTL_PORTALS_ENDPOINT_H
21 #define OMPI_MTL_PORTALS_ENDPOINT_H
22
23 #include "ompi/mca/mtl/portals4/mtl_portals4.h"
24
25 struct mca_mtl_base_endpoint_t {
26 ptl_process_t ptl_proc;
27 };
28 typedef struct mca_mtl_base_endpoint_t mca_mtl_base_endpoint_t;
29
30 static inline mca_mtl_base_endpoint_t *
31 ompi_mtl_portals4_get_endpoint (struct mca_mtl_base_module_t* mtl, ompi_proc_t *ompi_proc)
32 {
33 if (OPAL_UNLIKELY(NULL == ompi_proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_PORTALS4])) {
34 ompi_mtl_portals4_add_procs (mtl, 1, &ompi_proc);
35 }
36
37 return ompi_proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_PORTALS4];
38 }
39
40 #endif