coll/ml, bcol: fix prototypes (e.g. use the const modifier)
Этот коммит содержится в:
родитель
8f2d3aeb65
Коммит
a1627feaf7
@ -4,6 +4,8 @@
|
||||
* Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
|
||||
* Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -355,9 +357,9 @@ struct bcol_function_args_t {
|
||||
/* root, for rooted operations */
|
||||
int root;
|
||||
/* input buffer */
|
||||
void *sbuf;
|
||||
const void *sbuf;
|
||||
void *rbuf;
|
||||
void *userbuf;
|
||||
const void *userbuf;
|
||||
struct mca_bcol_base_payload_buffer_desc_t *src_desc;
|
||||
struct mca_bcol_base_payload_buffer_desc_t *dst_desc;
|
||||
/* ml buffer size */
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
|
||||
* Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* Copyright (c) 2014-2015 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -306,7 +306,7 @@ int mca_coll_ml_alltoall_nb(void *sbuf, int scount,
|
||||
|
||||
|
||||
/* allgather */
|
||||
int mca_coll_ml_allgather(void *sbuf, int scount,
|
||||
int mca_coll_ml_allgather(const void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype,
|
||||
void* rbuf, int rcount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
@ -314,7 +314,7 @@ int mca_coll_ml_allgather(void *sbuf, int scount,
|
||||
mca_coll_base_module_t *module);
|
||||
|
||||
/* non-blocking allgather */
|
||||
int mca_coll_ml_allgather_nb(void *sbuf, int scount,
|
||||
int mca_coll_ml_allgather_nb(const void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype,
|
||||
void* rbuf, int rcount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
@ -779,37 +779,37 @@ int mca_coll_ml_ibarrier_intra(struct ompi_communicator_t *comm,
|
||||
mca_coll_base_module_t *module);
|
||||
|
||||
/* Allreduce with EXTRA TOPO using - blocking */
|
||||
int mca_coll_ml_allreduce_dispatch(void *sbuf, void *rbuf, int count,
|
||||
int mca_coll_ml_allreduce_dispatch(const void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype, struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm, mca_coll_base_module_t *module);
|
||||
|
||||
/* Allreduce with EXTRA TOPO using - Non-blocking */
|
||||
int mca_coll_ml_allreduce_dispatch_nb(void *sbuf, void *rbuf, int count,
|
||||
int mca_coll_ml_allreduce_dispatch_nb(const void *sbuf, void *rbuf, int count,
|
||||
ompi_datatype_t *dtype, ompi_op_t *op,
|
||||
ompi_communicator_t *comm,
|
||||
ompi_request_t **req,
|
||||
mca_coll_base_module_t *module);
|
||||
|
||||
/* Allreduce - blocking */
|
||||
int mca_coll_ml_allreduce(void *sbuf, void *rbuf, int count,
|
||||
int mca_coll_ml_allreduce(const void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype, struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm,
|
||||
mca_coll_base_module_t *module);
|
||||
|
||||
/* Allreduce - Non-blocking */
|
||||
int mca_coll_ml_allreduce_nb(void *sbuf, void *rbuf, int count,
|
||||
int mca_coll_ml_allreduce_nb(const void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype, struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm,
|
||||
ompi_request_t **req,
|
||||
mca_coll_base_module_t *module);
|
||||
|
||||
/* Reduce - Blocking */
|
||||
int mca_coll_ml_reduce(void *sbuf, void *rbuf, int count,
|
||||
int mca_coll_ml_reduce(const void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype, struct ompi_op_t *op,
|
||||
int root, struct ompi_communicator_t *comm,
|
||||
mca_coll_base_module_t *module);
|
||||
|
||||
int mca_coll_ml_reduce_nb(void *sbuf, void *rbuf, int count,
|
||||
int mca_coll_ml_reduce_nb(const void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype, struct ompi_op_t *op,
|
||||
int root, struct ompi_communicator_t *comm,
|
||||
ompi_request_t **req,
|
||||
|
@ -4,6 +4,8 @@
|
||||
* Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
|
||||
* Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -132,7 +134,7 @@ static int mca_coll_ml_allgather_frag_progress(mca_coll_ml_collective_operation_
|
||||
int ret;
|
||||
size_t frag_len, dt_size;
|
||||
|
||||
void *buf;
|
||||
const void *buf;
|
||||
mca_bcol_base_payload_buffer_desc_t *src_buffer_desc;
|
||||
mca_coll_ml_collective_operation_progress_t *new_op;
|
||||
|
||||
@ -284,7 +286,7 @@ static int mca_coll_ml_allgather_frag_progress(mca_coll_ml_collective_operation_
|
||||
}
|
||||
|
||||
static inline __opal_attribute_always_inline__
|
||||
int mca_coll_ml_allgather_start (void *sbuf, int scount,
|
||||
int mca_coll_ml_allgather_start (const void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype,
|
||||
void* rbuf, int rcount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
@ -580,7 +582,7 @@ int mca_coll_ml_allgather_start (void *sbuf, int scount,
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int mca_coll_ml_allgather(void *sbuf, int scount,
|
||||
int mca_coll_ml_allgather(const void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype,
|
||||
void* rbuf, int rcount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
@ -606,7 +608,7 @@ int mca_coll_ml_allgather(void *sbuf, int scount,
|
||||
return ret;
|
||||
}
|
||||
|
||||
int mca_coll_ml_allgather_nb(void *sbuf, int scount,
|
||||
int mca_coll_ml_allgather_nb(const void *sbuf, int scount,
|
||||
struct ompi_datatype_t *sdtype,
|
||||
void* rbuf, int rcount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
|
@ -2,6 +2,8 @@
|
||||
/*
|
||||
* Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved.
|
||||
* Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -17,8 +19,6 @@
|
||||
#include "coll_ml_inlines.h"
|
||||
#include "coll_ml_allocation.h"
|
||||
|
||||
static long memory_buffer_index;
|
||||
|
||||
mca_bcol_base_memory_block_desc_t *mca_coll_ml_allocate_block(struct mca_coll_ml_component_t *ml_component,
|
||||
mca_bcol_base_memory_block_desc_t *ml_memblock)
|
||||
{
|
||||
|
@ -4,6 +4,8 @@
|
||||
* Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
|
||||
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -84,7 +86,7 @@ static int mca_coll_ml_allreduce_task_setup(mca_coll_ml_collective_operation_pro
|
||||
static int mca_coll_ml_allreduce_frag_progress(mca_coll_ml_collective_operation_progress_t *coll_op)
|
||||
{
|
||||
/* local variables */
|
||||
void *buf;
|
||||
const void *buf;
|
||||
|
||||
size_t dt_size;
|
||||
int ret, frag_len, count;
|
||||
@ -239,7 +241,7 @@ static int mca_coll_ml_allreduce_frag_progress(mca_coll_ml_collective_operation_
|
||||
}
|
||||
|
||||
static inline __opal_attribute_always_inline__
|
||||
int parallel_allreduce_start(void *sbuf, void *rbuf, int count,
|
||||
int parallel_allreduce_start(const void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype, struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm,
|
||||
mca_coll_ml_module_t *ml_module,
|
||||
@ -415,7 +417,7 @@ int parallel_allreduce_start(void *sbuf, void *rbuf, int count,
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int mca_coll_ml_allreduce(void *sbuf, void *rbuf, int count,
|
||||
int mca_coll_ml_allreduce(const void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype, struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm,
|
||||
mca_coll_base_module_t *module)
|
||||
@ -448,7 +450,7 @@ int mca_coll_ml_allreduce(void *sbuf, void *rbuf, int count,
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int mca_coll_ml_allreduce_nb(void *sbuf, void *rbuf, int count,
|
||||
int mca_coll_ml_allreduce_nb(const void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype, struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm,
|
||||
ompi_request_t **req,
|
||||
@ -478,7 +480,7 @@ int mca_coll_ml_allreduce_nb(void *sbuf, void *rbuf, int count,
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int mca_coll_ml_allreduce_dispatch(void *sbuf, void *rbuf, int count,
|
||||
int mca_coll_ml_allreduce_dispatch(const void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype, struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm, mca_coll_base_module_t *module)
|
||||
{
|
||||
@ -515,7 +517,7 @@ int mca_coll_ml_allreduce_dispatch(void *sbuf, void *rbuf, int count,
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int mca_coll_ml_allreduce_dispatch_nb(void *sbuf, void *rbuf, int count,
|
||||
int mca_coll_ml_allreduce_dispatch_nb(const void *sbuf, void *rbuf, int count,
|
||||
ompi_datatype_t *dtype, ompi_op_t *op,
|
||||
ompi_communicator_t *comm,
|
||||
ompi_request_t **req,
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
|
||||
* Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* Copyright (c) 2014-2015 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -262,7 +262,7 @@ struct mca_coll_ml_collective_operation_progress_t {
|
||||
/* destination data address in user memory */
|
||||
void *dest_user_addr;
|
||||
/* source data address in user memory */
|
||||
void *src_user_addr;
|
||||
const void *src_user_addr;
|
||||
/* total message size */
|
||||
size_t n_bytes_total;
|
||||
/* per-process total message size - relevant for operations
|
||||
@ -493,7 +493,7 @@ enum {
|
||||
};
|
||||
|
||||
static inline __opal_attribute_always_inline__
|
||||
int mca_coll_ml_convertor_prepare(ompi_datatype_t *dtype, int count, void *buff,
|
||||
int mca_coll_ml_convertor_prepare(ompi_datatype_t *dtype, int count, const void *buff,
|
||||
opal_convertor_t *convertor, int stream)
|
||||
{
|
||||
size_t bytes_packed;
|
||||
|
@ -1,6 +1,8 @@
|
||||
/*
|
||||
* Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved.
|
||||
* Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -54,7 +56,7 @@ int mca_coll_ml_pack_reorder_contiguous_data(mca_coll_ml_collective_operation_pr
|
||||
rank = topo_info->sort_list[i];
|
||||
|
||||
/* get the pointer to user data */
|
||||
user_buf=coll_op->full_message.src_user_addr;
|
||||
user_buf=(void *)coll_op->full_message.src_user_addr;
|
||||
/* compute offset into the user buffer */
|
||||
|
||||
/* offset for data already processed */
|
||||
@ -106,7 +108,7 @@ int mca_coll_ml_pack_reorder_noncontiguous_data(mca_coll_ml_collective_operation
|
||||
rank = topo_info->sort_list[i];
|
||||
|
||||
/* get the pointer to user data */
|
||||
user_buf=coll_op->full_message.src_user_addr;
|
||||
user_buf=(void *)coll_op->full_message.src_user_addr;
|
||||
/* compute offset into the user buffer */
|
||||
|
||||
/* offset for data already processed */
|
||||
|
@ -7,6 +7,8 @@
|
||||
* reserved.
|
||||
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -466,7 +468,7 @@ static inline __opal_attribute_always_inline__ mca_coll_ml_collective_operation_
|
||||
mca_coll_ml_alloc_op_prog_single_frag_dag(
|
||||
mca_coll_ml_module_t *ml_module,
|
||||
mca_coll_ml_collective_operation_description_t *coll_schedule,
|
||||
void *src, void *dst, size_t total_bytes,
|
||||
const void *src, void *dst, size_t total_bytes,
|
||||
size_t offset_into_user_buffer
|
||||
)
|
||||
{
|
||||
@ -511,7 +513,7 @@ mca_coll_ml_duplicate_op_prog_single_frag_dag(
|
||||
new_op = mca_coll_ml_alloc_op_prog_single_frag_dag(ml_module,
|
||||
ml_module->coll_ml_bcast_functions[old_op->fragment_data.current_coll_op],
|
||||
old_op->fragment_data.message_descriptor->dest_user_addr,
|
||||
old_op->fragment_data.message_descriptor->src_user_addr,
|
||||
(void *)old_op->fragment_data.message_descriptor->src_user_addr,
|
||||
old_op->fragment_data.message_descriptor->n_bytes_total,
|
||||
old_op->fragment_data.message_descriptor->n_bytes_scheduled);
|
||||
|
||||
|
@ -2,6 +2,8 @@
|
||||
/*
|
||||
* Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved.
|
||||
* Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -268,7 +270,7 @@ static int mca_coll_ml_reduce_frag_progress(mca_coll_ml_collective_operation_pro
|
||||
}
|
||||
|
||||
static inline __opal_attribute_always_inline__
|
||||
int parallel_reduce_start (void *sbuf, void *rbuf, int count,
|
||||
int parallel_reduce_start (const void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype, struct ompi_op_t *op,
|
||||
int root,
|
||||
struct ompi_communicator_t *comm,
|
||||
@ -457,7 +459,7 @@ int parallel_reduce_start (void *sbuf, void *rbuf, int count,
|
||||
}
|
||||
|
||||
|
||||
int mca_coll_ml_reduce(void *sbuf, void *rbuf, int count,
|
||||
int mca_coll_ml_reduce(const void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype, struct ompi_op_t *op,
|
||||
int root, struct ompi_communicator_t *comm,
|
||||
mca_coll_base_module_t *module) {
|
||||
@ -492,7 +494,7 @@ int mca_coll_ml_reduce(void *sbuf, void *rbuf, int count,
|
||||
}
|
||||
|
||||
|
||||
int mca_coll_ml_reduce_nb(void *sbuf, void *rbuf, int count,
|
||||
int mca_coll_ml_reduce_nb(const void *sbuf, void *rbuf, int count,
|
||||
struct ompi_datatype_t *dtype, struct ompi_op_t *op,
|
||||
int root, struct ompi_communicator_t *comm,
|
||||
ompi_request_t **req,
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user