Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework qvi_scope_split_agg_s. #255

Merged
merged 1 commit into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/qvi-bbuff-rmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -825,11 +825,11 @@ qvi_bbuff_rmi_unpack_item(
}

/**
* Unpacks qvi_hwpool_dev_s *
* Unpacks qvi_hwpool_dev_s &
*/
inline int
qvi_bbuff_rmi_unpack_item(
qvi_hwpool_dev_s *dev,
qvi_hwpool_dev_s &dev,
byte_t *buffpos,
size_t *bytes_written
) {
Expand Down
4 changes: 2 additions & 2 deletions src/qvi-group-mpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ struct qvi_group_mpi_s : public qvi_group_s {
}

virtual int
rank(void)
rank(void) const
{
return qvi_mpi_group_rank(m_mpi_group);
}

virtual int
size(void)
size(void) const
{
return qvi_mpi_group_size(m_mpi_group);
}
Expand Down
4 changes: 2 additions & 2 deletions src/qvi-group-omp.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ struct qvi_group_omp_s : public qvi_group_s {
}

virtual int
rank(void)
rank(void) const
{
return qvi_omp_group_id(m_ompgroup);
}

virtual int
size(void)
size(void) const
{
return qvi_omp_group_size(m_ompgroup);
}
Expand Down
4 changes: 2 additions & 2 deletions src/qvi-group-process.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ struct qvi_group_process_s : public qvi_group_s {
}

virtual int
rank(void)
rank(void) const
{
return qvi_process_group_id(m_proc_group);
}

virtual int
size(void)
size(void) const
{
return qvi_process_group_size(m_proc_group);
}
Expand Down
4 changes: 2 additions & 2 deletions src/qvi-group-pthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ struct qvi_group_pthread_s : public qvi_group_s {
}

virtual int
rank(void)
rank(void) const
{
return thgroup->rank();
}

virtual int
size(void)
size(void) const
{
return thgroup->size();
}
Expand Down
4 changes: 2 additions & 2 deletions src/qvi-group.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ struct qvi_group_s : qvi_refc_s {
hwloc(void);
/** Returns the number of members in this group. */
virtual int
size(void) = 0;
size(void) const = 0;
/** Returns the caller's group rank. */
virtual int
rank(void) = 0;
rank(void) const = 0;
/** Performs node-local group barrier. */
virtual int
barrier(void) = 0;
Expand Down
18 changes: 8 additions & 10 deletions src/qvi-hwpool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -260,47 +260,47 @@ int
qvi_hwpool_dev_s::unpack(
byte_t *buffpos,
size_t *bytes_written,
qvi_hwpool_dev_s *dev
qvi_hwpool_dev_s &dev
) {
size_t bw = 0, total_bw = 0;

int rc = qvi_bbuff_rmi_unpack_item(
&dev->m_hints, buffpos, &bw
&dev.m_hints, buffpos, &bw
);
if (qvi_unlikely(rc != QV_SUCCESS)) goto out;
total_bw += bw;
buffpos += bw;

rc = qvi_bbuff_rmi_unpack_item(
dev->m_affinity, buffpos, &bw
dev.m_affinity, buffpos, &bw
);
if (qvi_unlikely(rc != QV_SUCCESS)) goto out;
total_bw += bw;
buffpos += bw;

rc = qvi_bbuff_rmi_unpack_item(
&dev->m_type, buffpos, &bw
&dev.m_type, buffpos, &bw
);
if (qvi_unlikely(rc != QV_SUCCESS)) goto out;
total_bw += bw;
buffpos += bw;

rc = qvi_bbuff_rmi_unpack_item(
&dev->m_id, buffpos, &bw
&dev.m_id, buffpos, &bw
);
if (qvi_unlikely(rc != QV_SUCCESS)) goto out;
total_bw += bw;
buffpos += bw;

rc = qvi_bbuff_rmi_unpack_item(
dev->m_pci_bus_id, buffpos, &bw
dev.m_pci_bus_id, buffpos, &bw
);
if (qvi_unlikely(rc != QV_SUCCESS)) goto out;
total_bw += bw;
buffpos += bw;

rc = qvi_bbuff_rmi_unpack_item(
dev->m_uuid, buffpos, &bw
dev.m_uuid, buffpos, &bw
);
if (qvi_unlikely(rc != QV_SUCCESS)) goto out;
total_bw += bw;
Expand Down Expand Up @@ -453,9 +453,7 @@ qvi_hwpool_s::unpack(
// Unpack and add the devices.
for (size_t i = 0; i < ndev; ++i) {
qvi_hwpool_dev_s dev;
rc = qvi_bbuff_rmi_unpack_item(
&dev, buffpos, &bw
);
rc = qvi_bbuff_rmi_unpack_item(dev, buffpos, &bw);
if (qvi_unlikely(rc != QV_SUCCESS)) break;
total_bw += bw;
buffpos += bw;
Expand Down
2 changes: 1 addition & 1 deletion src/qvi-hwpool.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ struct qvi_hwpool_dev_s : qvi_hwpool_res_s {
unpack(
byte_t *buffpos,
size_t *bytes_written,
qvi_hwpool_dev_s *dev
qvi_hwpool_dev_s &dev
);
};

Expand Down
Loading
Loading