-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstream-triggering.h
More file actions
79 lines (65 loc) · 2.28 KB
/
Copy pathstream-triggering.h
File metadata and controls
79 lines (65 loc) · 2.28 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#ifndef MPI_ADVANCE_STREAM_TRIGGERING_H
#define MPI_ADVANCE_STREAM_TRIGGERING_H
#include <stdint.h>
#include "mpi.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef uintptr_t MPIS_Queue;
typedef struct MPIS_Request_struct* MPIS_Request;
/* Errors */
enum
{
MPIS_SUCCESS = 0,
MPIS_NOT_READY = -1,
MPIS_INVALID_REQUEST_STATE = -2,
MPIS_UNSUPPORTED_BEHAVIOR = -3,
};
extern const uintptr_t MPIS_QUEUE_NULL;
extern const MPIS_Request MPIS_REQUEST_NULL;
enum MPIS_Queue_type
{
THREAD = 0,
GPU_MEM_OPS = 3,
CXI = 4
};
typedef enum MPIS_Queue_type MPS_Queue_type;
/* Queue Management */
// int MPIS_Queue_fence();
int MPIS_Queue_free(MPIS_Queue*);
int MPIS_Queue_init(MPIS_Queue*, MPIS_Queue_type, void*);
int MPIS_Queue_wait(MPIS_Queue);
/* Push stuff to Queue */
int MPIS_Enqueue_startall(MPIS_Queue, int, MPIS_Request[]);
int MPIS_Enqueue_start(MPIS_Queue, MPIS_Request*);
int MPIS_Enqueue_waitall(MPIS_Queue);
/* New Matching Functions */
int MPIS_Match(MPIS_Request*, MPI_Status*);
int MPIS_Matchall(int, MPIS_Request[], MPI_Status[]);
int MPIS_Imatch(MPIS_Request*, MPIS_Request*);
int MPIS_Is_matched(MPIS_Request*, int*);
int MPIS_Queue_match(MPIS_Queue, MPIS_Request*, MPI_Status*);
/* Custom MPIS Override Functions */
/* These have minimal, if any, new functionality */
int MPIS_Request_free(MPIS_Request*);
int MPIS_Request_freeall(int, MPIS_Request[]);
int MPIS_Wait(MPIS_Request*, MPI_Status*);
int MPIS_Waitall(int, MPIS_Request[], MPI_Status[]);
/* Overrided Communication Functions */
int MPIS_Barrier_init(MPI_Comm, MPI_Info, MPIS_Request*);
// int MPIS_Bcast_init();
int MPIS_Recv_init(void*, MPI_Count, MPI_Datatype, int, int, MPI_Comm, MPI_Info,
MPIS_Request*);
int MPIS_Send_init(const void*, MPI_Count, MPI_Datatype, int, int, MPI_Comm, MPI_Info,
MPIS_Request*);
int MPIS_Rsend_init(const void*, MPI_Count, MPI_Datatype, int, int, MPI_Comm, MPI_Info,
MPIS_Request*);
int MPIS_Allreduce_init(const void*, void*, int, MPI_Datatype, MPI_Op, MPI_Comm, MPI_Info,
MPIS_Request*);
/* New GPU Memory Allocation functions */
int MPIS_Alloc_mem(MPI_Aint, MPI_Info, void**);
int MPIS_Free_mem(void*);
#ifdef __cplusplus
}
#endif
#endif