3 #ifndef __INT_REDIST_H__     4 #define __INT_REDIST_H__     6 #include "../tensor/algstrct.h"     7 #include "../mapping/distribution.h"    21                         distribution 
const & old_dist,
    22                         distribution 
const & new_dist,
    24                         char **              tsr_cyclic_data,
    26                         CommData             ord_glb_comm);
    46                                 distribution 
const & new_dist,
    48                                 int const *          old_phys_edge_len,
    49                                 int const *          old_virt_lda,
    50                                 int const *          old_offsets,
    51                                 int * 
const *        old_permutation,
    52                                 int const *          new_phys_edge_len,
    53                                 int const *          new_virt_lda,
    57                                 int const *          old_virt_edge_len);
    77                        distribution 
const & old_dist,
    78                        distribution 
const & new_dist,
    81                        int const *          old_virt_edge_len,
    82                        int const *          new_virt_lda,
    83                        int64_t *            send_counts,
    84                        int64_t *            recv_counts,
    85                        int64_t *            send_displs,
    86                        int64_t *            recv_displs,
    87                        CommData             ord_glb_comm,
    89                        int * 
const *        bucket_offset);
   110                        distribution 
const & new_dist,
   112                        char *&              tsr_cyclic_data,
   124                           int const *     old_phase,
   125                           mapping 
const * map);
 int ** compute_bucket_offsets(distribution const &old_dist, distribution const &new_dist, int const *len, int const *old_phys_edge_len, int const *old_virt_lda, int const *old_offsets, int *const *old_permutation, int const *new_phys_edge_len, int const *new_virt_lda, int forward, int old_virt_np, int new_virt_np, int const *old_virt_edge_len)
computes offsets for redistribution targets along each edge length 
void padded_reshuffle(int const *sym, distribution const &old_dist, distribution const &new_dist, char *tsr_data, char **tsr_cyclic_data, algstrct const *sr, CommData ord_glb_comm)
Reshuffle elements using key-value pair read/write. 
int can_block_reshuffle(int order, int const *old_phase, mapping const *map)
determines if tensor can be permuted by block 
void calc_cnt_displs(int const *sym, distribution const &old_dist, distribution const &new_dist, int new_nvirt, int np, int const *old_virt_edge_len, int const *new_virt_lda, int64_t *send_counts, int64_t *recv_counts, int64_t *send_displs, int64_t *recv_displs, CommData ord_glb_comm, int idx_lyr, int *const *bucket_offset)
assigns keys to an array of values 
void block_reshuffle(distribution const &old_dist, distribution const &new_dist, char *tsr_data, char *&tsr_cyclic_data, algstrct const *sr, CommData glb_comm)
Reshuffle elements by block given the global phases stay the same. 
double blres_est_time(int64_t tot_sz, int nv0, int nv1)
estimates execution time, given this processor sends a receives tot_sz across np procs ...