Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
dgtog_calc_cnt.h
Go to the documentation of this file.
1 /*Copyright (c) 2011, Edgar Solomonik, all rights reserved.*/
2 
3 #ifndef __DGTOG_CALC_CNT_H__
4 #define __DGTOG_CALC_CNT_H__
5 
6 #include "../tensor/algstrct.h"
7 #include "../mapping/distribution.h"
8 #include "redist.h"
9 
10 namespace CTF_int {
14  template <int idim>
15  int64_t calc_cnt(int const * sym,
16  int const * rep_phase,
17  int const * sphase,
18  int const * gidx_off,
19  int const * edge_len,
20  int const * loc_edge_len);
21 
25  template <int idim>
26  int64_t * calc_sy_pfx(int const * sym,
27  int const * rep_phase,
28  int const * sphase,
29  int const * gidx_off,
30  int const * edge_len,
31  int const * loc_edge_len);
32 
33  template <int idim>
34  void calc_drv_cnts(int ndim,
35  int const * sym,
36  int64_t * counts,
37  int const * rep_phase,
38  int const * rep_phase_lda,
39  int const * sphase,
40  int const * phys_phase,
41  int * gidx_off,
42  int const * edge_len,
43  int const * loc_edge_len);
44 
45  void calc_drv_displs(int const * sym,
46  int const * edge_len,
47  distribution const & old_dist,
48  distribution const & new_dist,
49  int64_t * counts,
50  int idx_lyr);
51 
52  template <int idim>
53  void calc_cnt_from_rep_cnt(int const * rep_phase,
54  int * const * pe_offset,
55  int * const * bucket_offset,
56  int64_t const * old_counts,
57  int64_t * counts,
58  int bucket_off,
59  int pe_off,
60  int dir);
61 
62  void precompute_offsets(distribution const & old_dist,
63  distribution const & new_dist,
64  int const * sym,
65  int const * len,
66  int const * rep_phase,
67  int const * phys_edge_len,
68  int const * virt_edge_len,
69  int const * virt_dim,
70  int const * virt_lda,
71  int64_t virt_nelem,
72  int ** pe_offset,
73  int ** bucket_offset,
74  int64_t ** data_offset,
75  int ** ivmax_pre);
76  template <int idim>
77  void redist_bucket(int * const * bucket_offset,
78  int64_t * const * data_offset,
79  int * const * ivmax_pre,
80  int rep_phase0,
81  int virt_dim0,
82  bool data_to_buckets,
83  char * __restrict__ data,
84  char ** __restrict__ buckets,
85  int64_t * counts,
86  algstrct const * sr,
87  int64_t data_off=0,
88  int bucket_off=0,
89  int prev_idx=0);
90 }
91 #endif
void redist_bucket(int *const *bucket_offset, int64_t *const *data_offset, int *const *ivmax_pre, int rep_phase0, int virt_dim0, bool data_to_buckets, char *__restrict__ data, char **__restrict__ buckets, int64_t *counts, algstrct const *sr, int64_t data_off, int bucket_off, int prev_idx)
Definition: dgtog_bucket.h:7
void calc_drv_cnts(int order, int const *sym, int64_t *counts, int const *rep_phase, int const *rep_phase_lda, int const *sphase, int const *phys_phase, int *gidx_off, int const *edge_len, int const *loc_edge_len)
void calc_drv_displs(int const *sym, int const *edge_len, distribution const &old_dist, distribution const &new_dist, int64_t *counts, int idx_lyr)
int64_t * calc_sy_pfx(int const *sym, int const *rep_phase, int const *sphase, int const *gidx_off, int const *edge_len, int const *loc_edge_len)
computes the cardinality of the sets of elements of a tensor of order idim+1 for different values of ...
int64_t calc_cnt(int const *sym, int const *rep_phase, int const *sphase, int const *gidx_off, int const *edge_len, int const *loc_edge_len)
computes the cardinality of the set of elements of a tensor of order idim+1 that are owned by process...
void precompute_offsets(distribution const &old_dist, distribution const &new_dist, int const *sym, int const *len, int const *rep_phase, int const *phys_edge_len, int const *virt_edge_len, int const *virt_dim, int const *virt_lda, int64_t virt_nelem, int **pe_offset, int **bucket_offset, int64_t **data_offset, int **ivmax_pre)
void calc_cnt_from_rep_cnt(int const *rep_phase, int *const *pe_offset, int *const *bucket_offset, int64_t const *old_counts, int64_t *counts, int bucket_off, int pe_off, int dir)