
The project includes following components and frameworks: - ML Collective component - NETPATTERNS and COMMPATTERNS common components - BCOL framework - SBGP framework Note: By default the ML collective component is disabled. In order to enable new collectives user should bump up the priority of ml component (coll_ml_priority) ============================================= Primary Contributors (in alphabetical order): Ishai Rabinovich (Mellanox) Joshua S. Ladd (ORNL / Mellanox) Manjunath Gorentla Venkata (ORNL) Mike Dubman (Mellanox) Noam Bloch (Mellanox) Pavel (Pasha) Shamis (ORNL / Mellanox) Richard Graham (ORNL / Mellanox) Vasily Filipov (Mellanox) This commit was SVN r27078.
53 строки
1.5 KiB
C
53 строки
1.5 KiB
C
/*
|
|
* Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
|
|
* Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved.
|
|
* $COPYRIGHT$
|
|
*
|
|
* Additional copyrights may follow
|
|
*
|
|
* $HEADER$
|
|
*/
|
|
|
|
#ifndef OMPI_COMMON_NETPATTERNS_MACROS_H
|
|
#define OMPI_COMMON_NETPATTERNS_MACROS_H
|
|
|
|
#include "ompi_config.h"
|
|
|
|
BEGIN_C_DECLS
|
|
|
|
/* function to decompose an interger into it's representation in base K */
|
|
/*
|
|
* input_value - value to translate (input)
|
|
* base - base of representation (input)
|
|
* highest_power - the highest power that may have a non-zero entry (input)
|
|
* the assumption is that this will be called in the critical path
|
|
* to compute communication patterns, so will precompute such values
|
|
* and pass the in.
|
|
* base_to_power_i - array of base to ith power (input)
|
|
* cum_base_to_power_i - array of cummulative base to ith power (input)
|
|
* base_k_rep - representation in base "base". Space is pre-allocated. (out)
|
|
*/
|
|
static inline __opal_attribute_always_inline__ void
|
|
common_netpatterns_obtain_rep_base_k (int input_value, int base,
|
|
int highest_power, int *base_to_power_i,
|
|
int *base_k_rep
|
|
)
|
|
{
|
|
/* local variables */
|
|
int lvl, work_value;
|
|
|
|
/* loop over all possible powers */
|
|
work_value=input_value;
|
|
for( lvl=highest_power ; lvl >= 0 ; lvl-- ) {
|
|
/* still need to compute the actual coefficient */
|
|
base_k_rep[lvl]=work_value/base_to_power_i[lvl];
|
|
work_value-=(base_k_rep[lvl]*base_to_power_i[lvl]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
END_C_DECLS
|
|
|
|
#endif /* OMPI_COMMON_NETPATTERNS_MACROS_H */
|