OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

common_cuda.h
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-2006 The Regents of the University of California.
11 * All rights reserved.
12 * Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
13 * $COPYRIGHT$
14 *
15 * Additional copyrights may follow
16 *
17 * $HEADER$
18 */
19
20 #ifndef OMPI_MCA_COMMON_CUDA_H
21 #define OMPI_MCA_COMMON_CUDA_H
22 #include "ompi/mca/btl/btl.h"
23
24 #define MEMHANDLE_SIZE 8
25 #define EVTHANDLE_SIZE 8
26 struct mca_mpool_common_cuda_reg_t {
27 mca_mpool_base_registration_t base;
28 uint64_t memHandle[MEMHANDLE_SIZE];
29 uint64_t evtHandle[EVTHANDLE_SIZE];
30 uint64_t event;
31 };
32 typedef struct mca_mpool_common_cuda_reg_t mca_mpool_common_cuda_reg_t;
33
34
35 OMPI_DECLSPEC void mca_common_cuda_register(void *ptr, size_t amount, char *msg);
36
37 OMPI_DECLSPEC void mca_common_cuda_unregister(void *ptr, char *msg);
38
39 OMPI_DECLSPEC void mca_common_wait_stream_synchronize(mca_mpool_common_cuda_reg_t *rget_reg);
40
41 OMPI_DECLSPEC int mca_common_cuda_memcpy(void *dst, void *src, size_t amount, char *msg,
42 struct mca_btl_base_descriptor_t *, int *done);
43
44 OMPI_DECLSPEC int progress_one_cuda_event(struct mca_btl_base_descriptor_t **);
45
46 OMPI_DECLSPEC int mca_common_cuda_memhandle_matches(mca_mpool_common_cuda_reg_t *new_reg,
47 mca_mpool_common_cuda_reg_t *old_reg);
48
49 OMPI_DECLSPEC void mca_common_cuda_construct_event_and_handle(uint64_t **event, void **handle);
50 OMPI_DECLSPEC void mca_common_cuda_destruct_event(uint64_t *event);
51
52 OMPI_DECLSPEC int cuda_getmemhandle(void *base, size_t, mca_mpool_base_registration_t *newreg,
53 mca_mpool_base_registration_t *hdrreg);
54 OMPI_DECLSPEC int cuda_ungetmemhandle(void *reg_data, mca_mpool_base_registration_t *reg);
55 OMPI_DECLSPEC int cuda_openmemhandle(void *base, size_t size, mca_mpool_base_registration_t *newreg,
56 mca_mpool_base_registration_t *hdrreg);
57 OMPI_DECLSPEC int cuda_closememhandle(void *reg_data, mca_mpool_base_registration_t *reg);
58
59
60 #endif /* OMPI_MCA_COMMON_CUDA_H */
mca_btl_base_descriptor_t
A descriptor that holds the parameters to a send/put/get operation along w/ a callback routine that i...
Definition: btl.h:275
event
Structure to represent a single event.
Definition: event_struct.h:87
mca_mpool_common_cuda_reg_t
Definition: common_cuda.h:26
mca_mpool_base_registration_t
Definition: mpool.h:44
btl.h
Byte Transfer Layer (BTL)