2 #include "../shared/util.h" 44 idx = (
char*)malloc(part.order*
sizeof(
char));
45 memcpy(idx, idx_, part.order*
sizeof(
char));
56 int * new_lens = (
int*)malloc(part.order*
sizeof(
int));
58 char * new_idx = (
char*)malloc(part.order);
59 for (
int i=0; i<part.order; i++){
60 if (part.lens[i] != 1){
61 new_lens[new_order] = part.lens[i];
62 new_idx[new_order] = idx[i];
void operator=(Partition const &other)
void * alloc(int64_t len)
alloc abstraction
Idx_Partition operator[](char const *idx)
int cdealloc(void *ptr)
free abstraction
Idx_Partition reduce_order() const
extracts non-trivial part of partition by ommitting unit dimensions