Skip to content

Commit

Permalink
Address the comments on the PR.
Browse files Browse the repository at this point in the history
Signed-off-by: George Bosilca <[email protected]>
  • Loading branch information
bosilca authored and jsquyres committed Aug 24, 2020
1 parent e59bde9 commit ee592f3
Show file tree
Hide file tree
Showing 5 changed files with 183 additions and 168 deletions.
27 changes: 8 additions & 19 deletions ompi/mca/coll/adapt/coll_adapt_algorithms.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,26 @@
#include "ompi/mca/coll/base/coll_base_functions.h"
#include <math.h>

typedef int (*ompi_mca_coll_adapt_ibcast_function_t)(IBCAST_ARGS);
typedef int (*ompi_mca_coll_adapt_ireduce_function_t)(IREDUCE_ARGS);

typedef struct ompi_coll_adapt_algorithm_index_s {
int algorithm_index;
uintptr_t algorithm_fn_ptr;
union {
ompi_mca_coll_adapt_ibcast_function_t ibcast_fn_ptr;
ompi_mca_coll_adapt_ireduce_function_t ireduce_fn_ptr;
};
} ompi_coll_adapt_algorithm_index_t;

/* Bcast */
int ompi_coll_adapt_ibcast_register(void);
int ompi_coll_adapt_ibcast_fini(void);
int ompi_coll_adapt_bcast(BCAST_ARGS);
int ompi_coll_adapt_ibcast(IBCAST_ARGS);
int ompi_coll_adapt_ibcast_generic(IBCAST_ARGS,
ompi_coll_tree_t * tree, size_t seg_size);
int ompi_coll_adapt_ibcast_binomial(IBCAST_ARGS);
int ompi_coll_adapt_ibcast_in_order_binomial(IBCAST_ARGS);
int ompi_coll_adapt_ibcast_binary(IBCAST_ARGS);
int ompi_coll_adapt_ibcast_pipeline(IBCAST_ARGS);
int ompi_coll_adapt_ibcast_chain(IBCAST_ARGS);
int ompi_coll_adapt_ibcast_linear(IBCAST_ARGS);
int ompi_coll_adapt_ibcast_tuned(IBCAST_ARGS);

/* Reduce */
int ompi_coll_adapt_ireduce_register(void);
int ompi_coll_adapt_ireduce_fini(void);
int ompi_coll_adapt_reduce(REDUCE_ARGS);
int ompi_coll_adapt_ireduce(IREDUCE_ARGS);
int ompi_coll_adapt_ireduce_generic(IREDUCE_ARGS,
ompi_coll_tree_t * tree, size_t seg_size);
int ompi_coll_adapt_ireduce_tuned(IREDUCE_ARGS);
int ompi_coll_adapt_ireduce_binomial(IREDUCE_ARGS);
int ompi_coll_adapt_ireduce_in_order_binomial(IREDUCE_ARGS);
int ompi_coll_adapt_ireduce_binary(IREDUCE_ARGS);
int ompi_coll_adapt_ireduce_pipeline(IREDUCE_ARGS);
int ompi_coll_adapt_ireduce_chain(IREDUCE_ARGS);
int ompi_coll_adapt_ireduce_linear(IREDUCE_ARGS);

2 changes: 1 addition & 1 deletion ompi/mca/coll/adapt/coll_adapt_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ struct ompi_coll_adapt_constant_reduce_context_s {
/* Mutex to protect num_sent */
opal_mutex_t *mutex_num_sent;
/* Mutex to protect each segment when do the reduce op */
opal_mutex_t **mutex_op_list;
opal_mutex_t *mutex_op_list;
/* Reduce operation */
ompi_op_t *op;
ompi_coll_tree_t *tree;
Expand Down
Loading

0 comments on commit ee592f3

Please sign in to comment.