3 #include "../shared/util.h" 60 int * idx_arr, * lda_A;
62 int i, off_A, nb_A, alloced, ret;
67 idx_arr = (
int*)this->
buffer;
78 #define SET_LDA_X(__X) \ 81 for (i=0; i<order_##__X; i++){ \ 82 lda_##__X[i] = nb_##__X; \ 83 nb_##__X = nb_##__X*virt_dim[idx_map_##__X[i]]; \ 85 memset(ilda_##__X, 0, num_dim*sizeof(int)); \ 86 for (i=0; i<order_##__X; i++){ \ 87 ilda_##__X[idx_map_##__X[i]] += lda_##__X[i]; \ 99 memset(idx_arr, 0, num_dim*
sizeof(
int));
110 off_A -= ilda_A[i]*idx_arr[i];
114 off_A += ilda_A[i]*idx_arr[i];
115 if (idx_arr[i] != 0)
break;
117 if (i==num_dim)
break;
166 printf(
"seq_tsr_scl:\n");
168 for (i=0; i<
order; i++){
169 printf(
"edge_len[%d]=%d\n",i,
edge_len[i]);
~scl_virt()
deallocates scl_virt object
void * alloc(int64_t len)
alloc abstraction
int sym_seq_scl_ref(char const *alpha, char *A, algstrct const *sr_A, int order_A, int const *edge_len_A, int const *sym_A, int const *idx_map_A)
performs symmetric scaling using algstrct const * sr_A
endomorphism const * func
int alloc_ptr(int64_t len, void **const ptr)
alloc abstraction
void run()
iterates over the dense virtualization block grid and contracts
int sym_seq_scl_cust(char const *alpha, char *A, algstrct const *sr_A, int const order_A, int const *edge_len_A, int const *sym_A, int const *idx_map_A, endomorphism const *func)
performs symmetric scaling using custom func
int el_size
size of each element of algstrct in bytes
int cdealloc(void *ptr)
free abstraction
scl * clone()
copies scl object
int64_t mem_fp()
returns the number of bytes of buffer space we need