Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
pad.h
Go to the documentation of this file.
1 /*Copyright (c) 2011, Edgar Solomonik, all rights reserved.*/
2 
3 #ifndef __INT_PAD_H__
4 #define __INT_PAD_H__
5 
6 #include "../tensor/algstrct.h"
7 
8 namespace CTF_int {
9 
20  void pad_key(int order,
21  int64_t num_pair,
22  int const * edge_len,
23  int const * padding,
24  PairIterator pairs,
25  algstrct const * sr,
26  int const * offsets = NULL);
27 
41  void depad_tsr(int order,
42  int64_t num_pair,
43  int const * edge_len,
44  int const * sym,
45  int const * padding,
46  int const * prepadding,
47  char const * pairsb,
48  char * new_pairsb,
49  int64_t * new_num_pair,
50  algstrct const * sr);
51 
67 /* void pad_tsr(int order,
68  int64_t size,
69  int const * edge_len,
70  int const * sym,
71  int const * padding,
72  int const * phys_phase,
73  int * phase_rank,
74  int const * virt_phase,
75  char const * old_data,
76  char ** new_pairs,
77  int64_t * new_size,
78  algstrct const * sr);
79  */
80 
96  void zero_padding( int order,
97  int64_t size,
98  int nvirt,
99  int const * edge_len,
100  int const * sym,
101  int const * padding,
102  int const * phase,
103  int const * phys_phase,
104  int const * virt_phase,
105  int const * cphase_rank,
106  char * vdata,
107  algstrct const * sr);
108 
125  void scal_diag(int order,
126  int64_t size,
127  int nvirt,
128  int const * edge_len,
129  int const * sym,
130  int const * padding,
131  int const * phase,
132  int const * phys_phase,
133  int const * virt_phase,
134  int const * cphase_rank,
135  char * vdata,
136  algstrct const * sr,
137  int const * sym_mask);
138 
139 }
140 
141 #endif
void zero_padding(int order, int64_t size, int nvirt, int const *edge_len, int const *sym, int const *padding, int const *phase, int const *phys_phase, int const *virt_phase, int const *cphase_rank, char *vdata, algstrct const *sr)
sets to zero all values in padded region of tensor
Definition: pad.cxx:374
void pad_key(int order, int64_t num_pair, int const *edge_len, int const *padding, PairIterator pairs, algstrct const *sr, int const *offsets)
applies padding to keys
Definition: pad.cxx:6
void scal_diag(int order, int64_t size, int nvirt, int const *edge_len, int const *sym, int const *padding, int const *phase, int const *phys_phase, int const *virt_phase, int const *cphase_rank, char *vdata, algstrct const *sr, int const *sym_mask)
scales each element by 1/(number of entries equivalent to it after permutation of indices for which s...
Definition: pad.cxx:567
void depad_tsr(int order, int64_t num_pair, int const *edge_len, int const *sym, int const *padding, int const *prepadding, char const *pairsb, char *new_pairsb, int64_t *new_num_pair, algstrct const *sr)
retrieves the unpadded pairs
Definition: pad.cxx:51