-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathqvi-group-omp.h
114 lines (98 loc) · 2.12 KB
/
qvi-group-omp.h
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/* -*- Mode: C++; c-basic-offset:4; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2020-2025 Triad National Security, LLC
* All rights reserved.
*
* Copyright (c) 2022 Inria
* All rights reserved.
*
* Copyright (c) 2022 Bordeaux INP
* All rights reserved.
*
* This file is part of the quo-vadis project. See the LICENSE file at the
* top-level directory of this distribution.
*/
/**
* @file qvi-group-omp.h
*/
#ifndef QVI_GROUP_OMP_H
#define QVI_GROUP_OMP_H
#include "qvi-common.h"
#include "qvi-group.h"
#include "qvi-omp.h"
#include "qvi-bbuff.h"
struct qvi_group_omp : public qvi_group {
private:
/** Task associated with this group. */
qvi_task *m_task = nullptr;
/** Underlying group instance. */
qvi_omp_group *m_ompgroup = nullptr;
public:
/** Constructor. */
qvi_group_omp(void);
/** Destructor. */
virtual ~qvi_group_omp(void);
virtual qvi_task *
task(void)
{
return m_task;
}
virtual int
rank(void) const
{
return m_ompgroup->rank();
}
virtual int
size(void) const
{
return m_ompgroup->size();
}
virtual int
barrier(void)
{
return m_ompgroup->barrier();
}
virtual int
make_intrinsic(
qv_scope_intrinsic_t intrinsic
);
virtual int
self(
qvi_group **child
);
virtual int
thread_split(
int,
qvi_group **
) {
// TODO(skg) Need to test this.
return QV_ERR_NOT_SUPPORTED;
}
virtual int
split(
int color,
int key,
qvi_group **child
);
virtual int
gather(
qvi_bbuff *txbuff,
int root,
qvi_bbuff_alloc_type_t *alloc_type,
qvi_bbuff ***rxbuffs
) {
return m_ompgroup->gather(txbuff, root, alloc_type, rxbuffs);
}
virtual int
scatter(
qvi_bbuff **txbuffs,
int root,
qvi_bbuff **rxbuff
) {
return m_ompgroup->scatter(txbuffs, root, rxbuff);
}
};
#endif
/*
* vim: ft=cpp ts=4 sts=4 sw=4 expandtab
*/