Skip to content

Commit

Permalink
Start cleaning up thread code. (#203)
Browse files Browse the repository at this point in the history
Signed-off-by: Samuel K. Gutierrez <[email protected]>
  • Loading branch information
samuelkgutierrez authored Jul 9, 2024
1 parent fdae3cd commit d870f3c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 89 deletions.
46 changes: 15 additions & 31 deletions src/qvi-thread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
* @file qvi-thread.cc
*/

#include "qvi-common.h" // IWYU pragma: keep
#include "qvi-thread.h"
#include "qvi-group.h"
#include "qvi-bbuff.h"
#include "qvi-utils.h"
#ifdef OPENMP_FOUND
#include <omp.h>
Expand Down Expand Up @@ -76,6 +76,20 @@ struct qvi_thread_s {
}
};

int
qvi_thread_new(
qvi_thread_t **th
) {
return qvi_new(th);
}

void
qvi_thread_free(
qvi_thread_t **th
) {
qvi_delete(th);
}

/**
* Copies contents of internal structure from src to dst.
*/
Expand All @@ -99,36 +113,6 @@ next_group_tab_id(
return qvi_group_t::next_id(gid);
}

/**
*
*/
int
qvi_thread_new(
qvi_thread_t **th
) {
return qvi_new(th);
}

/**
*
*/
void
qvi_thread_free(
qvi_thread_t **th
) {
qvi_delete(th);
}

/**
*
*/
int
qvi_thread_finalize(
qvi_thread_t *
) {
return QV_SUCCESS;
}

/**
*
*/
Expand Down
59 changes: 1 addition & 58 deletions src/qvi-thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
#define QVI_THREAD_H

#include "qvi-common.h"
#include "qvi-bbuff.h" // IWYU pragma: keep

#ifdef __cplusplus
extern "C" {
#endif

// Forward declarations.

Expand Down Expand Up @@ -61,91 +56,49 @@ typedef struct qv_layout_s {
int stride;
} qv_layout_t;
*/
/**
*
*/

int
qvi_thread_new(
qvi_thread_t **th
);

/**
*
*/
void
qvi_thread_free(
qvi_thread_t **th
);

/**
*
*/
int
qvi_thread_finalize(
qvi_thread_t *th
);

/**
*
*/
int
qvi_thread_node_barrier(
qvi_thread_t *th
);

/**
*
*/
int
qvi_thread_group_size(
const qvi_thread_group_t *group
);

/**
*
*/
int
qvi_thread_group_new(
qvi_thread_group_t **group
);

/**
*
*/
void
qvi_thread_group_free(
qvi_thread_group_t **group
);

/**
*
*/
int
qvi_thread_group_id(
const qvi_thread_group_t *group
);

/**
*
*/
int
qvi_thread_group_create(
qvi_thread_t *proc,
qvi_thread_group_t **group
);

/**
*
*/
int
qvi_thread_group_create_single(
qvi_thread_t *proc,
qvi_thread_group_t **group
);

/**
*
*/
int
qvi_thread_group_create_from_split(
qvi_thread_t *th,
Expand All @@ -155,9 +108,6 @@ qvi_thread_group_create_from_split(
qvi_thread_group_t **child
);

/**
*
*/
int
qvi_thread_group_gather_bbuffs(
qvi_thread_group_t *group,
Expand All @@ -167,9 +117,6 @@ qvi_thread_group_gather_bbuffs(
int *shared_alloc
);

/**
*
*/
int
qvi_thread_group_scatter_bbuffs(
qvi_thread_group_t *group,
Expand All @@ -178,10 +125,6 @@ qvi_thread_group_scatter_bbuffs(
qvi_bbuff_t **rxbuff
);

#ifdef __cplusplus
}
#endif

#endif

/*
Expand Down

0 comments on commit d870f3c

Please sign in to comment.