File: accelerator_cuda.h

package info (click to toggle)
openmpi 5.0.8-9
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 201,680 kB
  • sloc: ansic: 613,078; makefile: 42,350; sh: 11,194; javascript: 9,244; f90: 7,052; java: 6,404; perl: 5,179; python: 1,859; lex: 740; fortran: 61; cpp: 20; tcl: 12
file content (54 lines) | stat: -rw-r--r-- 1,534 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
 * Copyright (c) 2014      Intel, Inc.  All rights reserved.
 * Copyright (c) 2017-2022 Amazon.com, Inc. or its affiliates.
 *                         All Rights reserved.
 * $COPYRIGHT$
 *
 * Additional copyrights may follow
 *
 * $HEADER$
 */

#ifndef MCA_ACCELERATOR_CUDA_H
#define MCA_ACCELERATOR_CUDA_H

#include "opal_config.h"

#include <cuda.h>

#include "opal/mca/accelerator/accelerator.h"
#include "opal/mca/threads/mutex.h"

BEGIN_C_DECLS

typedef struct {
    opal_accelerator_base_component_t super;
} opal_accelerator_cuda_component_t;

struct opal_accelerator_cuda_stream_t {
    opal_accelerator_stream_t base;
};
typedef struct opal_accelerator_cuda_stream_t opal_accelerator_cuda_stream_t;
OBJ_CLASS_DECLARATION(opal_accelerator_cuda_stream_t);

struct opal_accelerator_cuda_event_t {
    opal_accelerator_event_t base;
};
typedef struct opal_accelerator_cuda_event_t opal_accelerator_cuda_event_t;
OBJ_CLASS_DECLARATION(opal_accelerator_cuda_event_t);

/* Declare extern variables, defined in accelerator_cuda_component.c */
OPAL_DECLSPEC extern CUstream opal_accelerator_cuda_memcpy_stream;
OPAL_DECLSPEC extern opal_mutex_t opal_accelerator_cuda_stream_lock;

OPAL_DECLSPEC extern opal_accelerator_cuda_component_t mca_accelerator_cuda_component;

OPAL_DECLSPEC extern opal_accelerator_base_module_t opal_accelerator_cuda_module;

OPAL_DECLSPEC extern int opal_accelerator_cuda_num_devices;

OPAL_DECLSPEC extern int opal_accelerator_cuda_delayed_init(void);

END_C_DECLS

#endif /* MCA_ACCELERATOR_CUDA_H */