Skip to content

Commit 7f34263

Browse files
Cleanup some naming and other minor edits. (#266)
Signed-off-by: Samuel K. Gutierrez <[email protected]>
1 parent f102e75 commit 7f34263

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+418
-434
lines changed

include/quo-vadis.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ extern "C" {
3939
#define QUO_VADIS_API_VERSION 0x00000001
4040

4141
/** Opaque quo-vadis scope. */
42-
struct qv_scope_s;
43-
typedef struct qv_scope_s qv_scope_t;
42+
struct qv_scope;
43+
typedef struct qv_scope qv_scope_t;
4444

4545
/**
4646
* Return codes.

src/quo-vadis-mpi.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ qvi_mpi_scope_get(
6464
const int rc = qvi_new(&izgroup, comm);
6565
if (qvi_unlikely(rc != QV_SUCCESS)) return rc;
6666

67-
return qv_scope_s::make_intrinsic(izgroup, iscope, scope);
67+
return qv_scope::make_intrinsic(izgroup, iscope, scope);
6868
}
6969

7070
int
@@ -87,7 +87,7 @@ qvi_mpi_scope_comm_dup(
8787
qv_scope_t *scope,
8888
MPI_Comm *comm
8989
) {
90-
return dynamic_cast<qvi_group_mpi_t *>(scope->group())->comm_dup(comm);
90+
return dynamic_cast<qvi_group_mpi *>(scope->group())->comm_dup(comm);
9191
}
9292

9393
int

src/quo-vadis-omp.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ qvi_omp_scope_get(
2929
qv_scope_t **scope
3030
) {
3131
// Create the base process group.
32-
qvi_group_omp_s *zgroup = nullptr;
32+
qvi_group_omp *zgroup = nullptr;
3333
const int rc = qvi_new(&zgroup);
3434
if (qvi_unlikely(rc != QV_SUCCESS)) {
3535
*scope = nullptr;
3636
return rc;
3737
}
38-
return qv_scope_s::make_intrinsic(zgroup, iscope, scope);
38+
return qv_scope::make_intrinsic(zgroup, iscope, scope);
3939
}
4040

4141
int

src/quo-vadis-process.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ qvi_process_scope_get(
2222
qv_scope_t **scope
2323
) {
2424
// Create the base process group.
25-
qvi_group_process_s *zgroup = nullptr;
25+
qvi_group_process *zgroup = nullptr;
2626
const int rc = qvi_new(&zgroup);
2727
if (qvi_unlikely(rc != QV_SUCCESS)) {
2828
*scope = nullptr;
2929
return rc;
3030
}
31-
return qv_scope_s::make_intrinsic(zgroup, iscope, scope);
31+
return qv_scope::make_intrinsic(zgroup, iscope, scope);
3232
}
3333

3434
int

src/quo-vadis-pthread.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ qv_pthread_create(
108108
// pthread_create(), return a reasonable errno.
109109
if (qvi_unlikely(rc != QV_SUCCESS)) return ENOMEM;
110110

111-
auto group = dynamic_cast<qvi_group_pthread_t *>(scope->group());
111+
auto group = dynamic_cast<qvi_group_pthread *>(scope->group());
112112
qvi_pthread_group_pthread_create_args_s *cargs = nullptr;
113113
rc = qvi_new(&cargs, group->thgroup, qvi_pthread_routine, arg_ptr);
114114
if (qvi_unlikely(rc != QV_SUCCESS)) {
@@ -129,7 +129,7 @@ qv_pthread_scopes_free(
129129
return QV_ERR_INVLD_ARG;
130130
}
131131
try {
132-
qv_scope_s::thdestroy(&scopes, nscopes);
132+
qv_scope::thdestroy(&scopes, nscopes);
133133
return QV_SUCCESS;
134134
}
135135
qvi_catch_and_return();

src/quo-vadis.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ qv_scope_free(
8282
return QV_ERR_INVLD_ARG;
8383
}
8484
try {
85-
qv_scope_s::destroy(&scope);
85+
qv_scope::destroy(&scope);
8686
return QV_SUCCESS;
8787
}
8888
qvi_catch_and_return();

src/qvi-bbuff-rmi.h

+41-41
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* c = hwloc_cpuset_t
1919
* c = qvi_hwloc_bitmap_s
2020
* d = qv_scope_create_hints_t
21-
* h = qvi_hwpool_s *
21+
* h = qvi_hwpool *
2222
* i = int
2323
* s = char *
2424
* s = std::string
@@ -122,7 +122,7 @@ template<>
122122
inline void
123123
qvi_bbuff_rmi_pack_type_picture(
124124
std::string &picture,
125-
const qvi_hwpool_s *
125+
const qvi_hwpool *
126126
) {
127127
picture += "h";
128128
}
@@ -131,7 +131,7 @@ template<>
131131
inline void
132132
qvi_bbuff_rmi_pack_type_picture(
133133
std::string &picture,
134-
qvi_hwpool_s *
134+
qvi_hwpool *
135135
) {
136136
picture += "h";
137137
}
@@ -140,7 +140,7 @@ template<>
140140
inline void
141141
qvi_bbuff_rmi_pack_type_picture(
142142
std::string &picture,
143-
qvi_hwpool_s **
143+
qvi_hwpool **
144144
) {
145145
picture += "h";
146146
}
@@ -286,7 +286,7 @@ qvi_bbuff_rmi_get_picture
286286
template<typename T>
287287
inline int
288288
qvi_bbuff_rmi_pack_item(
289-
qvi_bbuff_t *,
289+
qvi_bbuff *,
290290
T
291291
);
292292

@@ -295,7 +295,7 @@ qvi_bbuff_rmi_pack_item(
295295
*/
296296
inline int
297297
qvi_bbuff_rmi_pack_item(
298-
qvi_bbuff_t *buff,
298+
qvi_bbuff *buff,
299299
size_t data
300300
) {
301301
return buff->append(&data, sizeof(data));
@@ -306,7 +306,7 @@ qvi_bbuff_rmi_pack_item(
306306
*/
307307
inline int
308308
qvi_bbuff_rmi_pack_item(
309-
qvi_bbuff_t *buff,
309+
qvi_bbuff *buff,
310310
int data
311311
) {
312312
return buff->append(&data, sizeof(data));
@@ -317,7 +317,7 @@ qvi_bbuff_rmi_pack_item(
317317
*/
318318
inline int
319319
qvi_bbuff_rmi_pack_item(
320-
qvi_bbuff_t *buff,
320+
qvi_bbuff *buff,
321321
qv_scope_create_hints_t data
322322
) {
323323
const int dai = (int)data;
@@ -329,7 +329,7 @@ qvi_bbuff_rmi_pack_item(
329329
*/
330330
inline int
331331
qvi_bbuff_rmi_pack_item(
332-
qvi_bbuff_t *buff,
332+
qvi_bbuff *buff,
333333
qv_hw_obj_type_t data
334334
) {
335335
const int dai = (int)data;
@@ -341,7 +341,7 @@ qvi_bbuff_rmi_pack_item(
341341
*/
342342
inline int
343343
qvi_bbuff_rmi_pack_item(
344-
qvi_bbuff_t *buff,
344+
qvi_bbuff *buff,
345345
qv_device_id_type_t data
346346
) {
347347
const int dai = (int)data;
@@ -353,7 +353,7 @@ qvi_bbuff_rmi_pack_item(
353353
*/
354354
inline int
355355
qvi_bbuff_rmi_pack_item(
356-
qvi_bbuff_t *buff,
356+
qvi_bbuff *buff,
357357
qv_scope_intrinsic_t data
358358
) {
359359
const int dai = (int)data;
@@ -366,7 +366,7 @@ qvi_bbuff_rmi_pack_item(
366366
*/
367367
inline int
368368
qvi_bbuff_rmi_pack_item(
369-
qvi_bbuff_t *buff,
369+
qvi_bbuff *buff,
370370
pid_t data
371371
) {
372372
const int dai = (int)data;
@@ -376,7 +376,7 @@ qvi_bbuff_rmi_pack_item(
376376

377377
inline int
378378
qvi_bbuff_rmi_pack_item_impl(
379-
qvi_bbuff_t *buff,
379+
qvi_bbuff *buff,
380380
cstr_t data
381381
) {
382382
return buff->append(data, strlen(data) + 1);
@@ -387,7 +387,7 @@ qvi_bbuff_rmi_pack_item_impl(
387387
*/
388388
inline int
389389
qvi_bbuff_rmi_pack_item(
390-
qvi_bbuff_t *buff,
390+
qvi_bbuff *buff,
391391
const std::string &data
392392
) {
393393
return qvi_bbuff_rmi_pack_item_impl(buff, data.c_str());
@@ -398,7 +398,7 @@ qvi_bbuff_rmi_pack_item(
398398
*/
399399
inline int
400400
qvi_bbuff_rmi_pack_item(
401-
qvi_bbuff_t *buff,
401+
qvi_bbuff *buff,
402402
cstr_t data
403403
) {
404404
return qvi_bbuff_rmi_pack_item_impl(buff, data);
@@ -409,7 +409,7 @@ qvi_bbuff_rmi_pack_item(
409409
*/
410410
inline int
411411
qvi_bbuff_rmi_pack_item(
412-
qvi_bbuff_t *buff,
412+
qvi_bbuff *buff,
413413
char *data
414414
) {
415415
return qvi_bbuff_rmi_pack_item_impl(buff, data);
@@ -420,7 +420,7 @@ qvi_bbuff_rmi_pack_item(
420420
*/
421421
inline int
422422
qvi_bbuff_rmi_pack_item(
423-
qvi_bbuff_t *,
423+
qvi_bbuff *,
424424
qvi_bbuff_rmi_zero_msg_t
425425
) {
426426
return QV_SUCCESS;
@@ -431,7 +431,7 @@ qvi_bbuff_rmi_pack_item(
431431
*/
432432
inline int
433433
qvi_bbuff_rmi_pack_item(
434-
qvi_bbuff_t *buff,
434+
qvi_bbuff *buff,
435435
qvi_bbuff_rmi_bytes_in_t data
436436
) {
437437
// We store size then data so unpack has an easier time, but keep
@@ -447,7 +447,7 @@ qvi_bbuff_rmi_pack_item(
447447
*/
448448
inline int
449449
qvi_bbuff_rmi_pack_item_impl(
450-
qvi_bbuff_t *buff,
450+
qvi_bbuff *buff,
451451
hwloc_const_cpuset_t data
452452
) {
453453
// Protect against null data.
@@ -472,7 +472,7 @@ qvi_bbuff_rmi_pack_item_impl(
472472
*/
473473
inline int
474474
qvi_bbuff_rmi_pack_item(
475-
qvi_bbuff_t *buff,
475+
qvi_bbuff *buff,
476476
hwloc_cpuset_t data
477477
) {
478478
return qvi_bbuff_rmi_pack_item_impl(buff, data);
@@ -483,7 +483,7 @@ qvi_bbuff_rmi_pack_item(
483483
*/
484484
inline int
485485
qvi_bbuff_rmi_pack_item(
486-
qvi_bbuff_t *buff,
486+
qvi_bbuff *buff,
487487
const qvi_hwloc_bitmap_s &bitmap
488488
) {
489489
return qvi_bbuff_rmi_pack_item_impl(buff, bitmap.cdata());
@@ -494,7 +494,7 @@ qvi_bbuff_rmi_pack_item(
494494
*/
495495
inline int
496496
qvi_bbuff_rmi_pack_item(
497-
qvi_bbuff_t *buff,
497+
qvi_bbuff *buff,
498498
hwloc_const_cpuset_t data
499499
) {
500500
return qvi_bbuff_rmi_pack_item_impl(buff, data);
@@ -505,8 +505,8 @@ qvi_bbuff_rmi_pack_item(
505505
*/
506506
inline int
507507
qvi_bbuff_rmi_pack_item(
508-
qvi_bbuff_t *buff,
509-
const qvi_hwpool_cpu_s &data
508+
qvi_bbuff *buff,
509+
const qvi_hwpool_cpu &data
510510
) {
511511
return data.packinto(buff);
512512
}
@@ -516,37 +516,37 @@ qvi_bbuff_rmi_pack_item(
516516
*/
517517
inline int
518518
qvi_bbuff_rmi_pack_item(
519-
qvi_bbuff_t *buff,
520-
qvi_hwpool_dev_s *data
519+
qvi_bbuff *buff,
520+
qvi_hwpool_dev *data
521521
) {
522522
return data->packinto(buff);
523523
}
524524

525525
/**
526-
* Packs qvi_hwpool_s *
526+
* Packs qvi_hwpool *
527527
*/
528528
inline int
529529
qvi_bbuff_rmi_pack_item_impl(
530-
qvi_bbuff_t *buff,
531-
const qvi_hwpool_s *data
530+
qvi_bbuff *buff,
531+
const qvi_hwpool *data
532532
) {
533533
return data->packinto(buff);
534534
}
535535

536536
/**
537-
* Packs qvi_hwpool_s *
537+
* Packs qvi_hwpool *
538538
*/
539539
inline int
540540
qvi_bbuff_rmi_pack_item(
541-
qvi_bbuff_t *buff,
542-
qvi_hwpool_s *data
541+
qvi_bbuff *buff,
542+
qvi_hwpool *data
543543
) {
544544
return qvi_bbuff_rmi_pack_item_impl(buff, data);
545545
}
546546

547547
inline int
548548
qvi_bbuff_rmi_pack(
549-
qvi_bbuff_t *
549+
qvi_bbuff *
550550
) {
551551
// Base case
552552
return QV_SUCCESS;
@@ -555,7 +555,7 @@ qvi_bbuff_rmi_pack(
555555
template<typename T, typename... Types>
556556
inline int
557557
qvi_bbuff_rmi_pack(
558-
qvi_bbuff_t *buff,
558+
qvi_bbuff *buff,
559559
T&& arg,
560560
Types &&...args
561561
) {
@@ -817,35 +817,35 @@ qvi_bbuff_rmi_unpack_item(
817817
*/
818818
inline int
819819
qvi_bbuff_rmi_unpack_item(
820-
qvi_hwpool_cpu_s &cpu,
820+
qvi_hwpool_cpu &cpu,
821821
byte_t *buffpos,
822822
size_t *bytes_written
823823
) {
824-
return qvi_hwpool_cpu_s::unpack(buffpos, bytes_written, cpu);
824+
return qvi_hwpool_cpu::unpack(buffpos, bytes_written, cpu);
825825
}
826826

827827
/**
828828
* Unpacks qvi_hwpool_dev_s &
829829
*/
830830
inline int
831831
qvi_bbuff_rmi_unpack_item(
832-
qvi_hwpool_dev_s &dev,
832+
qvi_hwpool_dev &dev,
833833
byte_t *buffpos,
834834
size_t *bytes_written
835835
) {
836-
return qvi_hwpool_dev_s::unpack(buffpos, bytes_written, dev);
836+
return qvi_hwpool_dev::unpack(buffpos, bytes_written, dev);
837837
}
838838

839839
/**
840-
* Unpacks qvi_hwpool_s **
840+
* Unpacks qvi_hwpool **
841841
*/
842842
inline int
843843
qvi_bbuff_rmi_unpack_item(
844-
qvi_hwpool_s **hwp,
844+
qvi_hwpool **hwp,
845845
byte_t *buffpos,
846846
size_t *bytes_written
847847
) {
848-
return qvi_hwpool_s::unpack(buffpos, bytes_written, hwp);
848+
return qvi_hwpool::unpack(buffpos, bytes_written, hwp);
849849
}
850850

851851
/**

0 commit comments

Comments
 (0)