Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
redist.h
Go to the documentation of this file.
1 /*Copyright (c) 2011, Edgar Solomonik, all rights reserved.*/
2 
3 #ifndef __INT_REDIST_H__
4 #define __INT_REDIST_H__
5 
6 #include "../tensor/algstrct.h"
7 #include "../mapping/distribution.h"
8 
9 namespace CTF_int {
20  void padded_reshuffle(int const * sym,
21  distribution const & old_dist,
22  distribution const & new_dist,
23  char * tsr_data,
24  char ** tsr_cyclic_data,
25  algstrct const * sr,
26  CommData ord_glb_comm);
27 
45  int ** compute_bucket_offsets(distribution const & old_dist,
46  distribution const & new_dist,
47  int const * len,
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,
54  int forward,
55  int old_virt_np,
56  int new_virt_np,
57  int const * old_virt_edge_len);
58 
76  void calc_cnt_displs(int const * sym,
77  distribution const & old_dist,
78  distribution const & new_dist,
79  int new_nvirt,
80  int np,
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,
88  int idx_lyr,
89  int * const * bucket_offset);
90 
91 
98  double blres_est_time(int64_t tot_sz, int nv0, int nv1);
99 
109  void block_reshuffle(distribution const & old_dist,
110  distribution const & new_dist,
111  char * tsr_data,
112  char *& tsr_cyclic_data,
113  algstrct const * sr,
114  CommData glb_comm);
115 
123  int can_block_reshuffle(int order,
124  int const * old_phase,
125  mapping const * map);
126 }
127 
128 #endif
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
Definition: redist.cxx:111
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.
Definition: redist.cxx:8
int can_block_reshuffle(int order, int const *old_phase, mapping const *map)
determines if tensor can be permuted by block
Definition: redist.cxx:618
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
Definition: redist.cxx:170
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.
Definition: redist.cxx:454
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 ...
Definition: redist.cxx:449
def np(self)
Definition: core.pyx:315