@@ -41,7 +41,7 @@ qv_scope_bind_push(
41
41
return QV_ERR_INVLD_ARG;
42
42
}
43
43
try {
44
- return qvi_scope_bind_push ( scope);
44
+ return scope-> bind_push ( );
45
45
}
46
46
qvi_catch_and_return ();
47
47
}
@@ -54,7 +54,7 @@ qv_scope_bind_pop(
54
54
return QV_ERR_INVLD_ARG;
55
55
}
56
56
try {
57
- return qvi_scope_bind_pop ( scope);
57
+ return scope-> bind_pop ( );
58
58
}
59
59
qvi_catch_and_return ();
60
60
}
@@ -69,7 +69,7 @@ qv_scope_bind_string(
69
69
return QV_ERR_INVLD_ARG;
70
70
}
71
71
try {
72
- return qvi_scope_bind_string ( scope, format, str);
72
+ return scope-> bind_string ( format, str);
73
73
}
74
74
qvi_catch_and_return ();
75
75
}
@@ -82,7 +82,7 @@ qv_scope_free(
82
82
return QV_ERR_INVLD_ARG;
83
83
}
84
84
try {
85
- qvi_scope_delete (&scope);
85
+ qv_scope_s::del (&scope);
86
86
return QV_SUCCESS;
87
87
}
88
88
qvi_catch_and_return ();
@@ -98,7 +98,8 @@ qv_scope_nobjs(
98
98
return QV_ERR_INVLD_ARG;
99
99
}
100
100
try {
101
- return qvi_scope_nobjects (scope, obj, nobjs);
101
+ *nobjs = scope->nobjects (obj);
102
+ return QV_SUCCESS;
102
103
}
103
104
qvi_catch_and_return ();
104
105
}
@@ -107,13 +108,14 @@ qv_scope_nobjs(
107
108
int
108
109
qv_scope_taskid (
109
110
qv_scope_t *scope,
110
- int *taskid
111
+ int *rank
111
112
) {
112
- if (qvi_unlikely (!scope || !taskid )) {
113
+ if (qvi_unlikely (!scope || !rank )) {
113
114
return QV_ERR_INVLD_ARG;
114
115
}
115
116
try {
116
- return qvi_scope_group_rank (scope, taskid);
117
+ *rank = scope->group_rank ();
118
+ return QV_SUCCESS;
117
119
}
118
120
qvi_catch_and_return ();
119
121
}
@@ -128,7 +130,8 @@ qv_scope_ntasks(
128
130
return QV_ERR_INVLD_ARG;
129
131
}
130
132
try {
131
- return qvi_scope_group_size (scope, ntasks);
133
+ *ntasks = scope->group_size ();
134
+ return QV_SUCCESS;
132
135
}
133
136
qvi_catch_and_return ();
134
137
}
@@ -141,7 +144,7 @@ qv_scope_barrier(
141
144
return QV_ERR_INVLD_ARG;
142
145
}
143
146
try {
144
- return qvi_scope_barrier ( scope);
147
+ return scope-> barrier ( );
145
148
}
146
149
qvi_catch_and_return ();
147
150
}
@@ -159,9 +162,7 @@ qv_scope_create(
159
162
return QV_ERR_INVLD_ARG;
160
163
}
161
164
try {
162
- return qvi_scope_create (
163
- scope, type, nobjs, hints, subscope
164
- );
165
+ return scope->create (type, nobjs, hints, subscope);
165
166
}
166
167
qvi_catch_and_return ();
167
168
}
@@ -180,9 +181,7 @@ qv_scope_split(
180
181
// We use the sentinel value QV_HW_OBJ_LAST to differentiate between
181
182
// calls from split() and split_at(). Since this call doesn't have a
182
183
// hardware type argument, we use QV_HW_OBJ_LAST as the hardware type.
183
- return qvi_scope_split (
184
- scope, npieces, color, QV_HW_OBJ_LAST, subscope
185
- );
184
+ return scope->split (npieces, color, QV_HW_OBJ_LAST, subscope);
186
185
}
187
186
qvi_catch_and_return ();
188
187
}
@@ -198,9 +197,7 @@ qv_scope_split_at(
198
197
return QV_ERR_INVLD_ARG;
199
198
}
200
199
try {
201
- return qvi_scope_split_at (
202
- scope, type, group_id, subscope
203
- );
200
+ return scope->split_at (type, group_id, subscope);
204
201
}
205
202
qvi_catch_and_return ();
206
203
}
@@ -217,9 +214,7 @@ qv_scope_get_device_id(
217
214
return QV_ERR_INVLD_ARG;
218
215
}
219
216
try {
220
- return qvi_scope_device_id (
221
- scope, dev_obj, dev_index, id_type, dev_id
222
- );
217
+ return scope->device_id (dev_obj, dev_index, id_type, dev_id);
223
218
}
224
219
qvi_catch_and_return ();
225
220
}
0 commit comments