Commit b818f3db authored by Edgar Solomonik's avatar Edgar Solomonik
Browse files

Merge branch 'master' of repo.eecs.berkeley.edu:users/solomon/ctf

parents 977368d9 a5e7f40e
No related merge requests found
......@@ -725,7 +725,7 @@ int tCTF<dtype>::clean_tensors(){
std::vector< tensor<dtype>* > * tensors = dt->get_tensors();
for (i=0; i<tensors->size(); i++){
dt->del_tsr(i);
CTF_free((*tensors)[i]);
// CTF_free((*tensors)[i]);
}
tensors->clear();
return DIST_TENSOR_SUCCESS;
......
......@@ -1230,12 +1230,12 @@ template<typename dtype>
int dist_tensor<dtype>::del_tsr(int const tid){
tensor<dtype> * tsr;
if (global_comm->rank == 0){
DPRINTF(1,"Deleting tensor %d\n",tid);
}
tsr = tensors[tid];
if (tsr->is_alloced){
unfold_tsr(tsr);
if (tsr != NULL){
if (global_comm->rank == 0){
DPRINTF(1,"Deleting tensor %d\n",tid);
}
//unfold_tsr(tsr);
CTF_free(tsr->edge_len);
if (tsr->is_padded)
CTF_free(tsr->padding);
......@@ -1253,6 +1253,8 @@ int dist_tensor<dtype>::del_tsr(int const tid){
}
CTF_free(tsr->edge_map);
tsr->is_alloced = 0;
CTF_free(tsr);
tensors[tid] = NULL;
}
return DIST_TENSOR_SUCCESS;
......
......@@ -64,8 +64,8 @@ int relativeSign(const std::vector<T>& s1, const std::vector<T>& s2)
}
inline
double align_symmetric_indices(int ndim_A, int* idx_A, int* sym_A,
int ndim_B, int* idx_B, int* sym_B)
double align_symmetric_indices(int ndim_A, int* idx_A, const int* sym_A,
int ndim_B, int* idx_B, const int* sym_B)
{
int fact = 1;
......@@ -170,9 +170,9 @@ double align_symmetric_indices(int ndim_A, int* idx_A, int* sym_A,
}
inline
double align_symmetric_indices(int ndim_A, int* idx_A, int* sym_A,
int ndim_B, int* idx_B, int* sym_B,
int ndim_C, int* idx_C, int* sym_C)
double align_symmetric_indices(int ndim_A, int* idx_A, const int* sym_A,
int ndim_B, int* idx_B, const int* sym_B,
int ndim_C, int* idx_C, const int* sym_C)
{
int fact = 1;
......@@ -357,9 +357,9 @@ double align_symmetric_indices(int ndim_A, int* idx_A, int* sym_A,
}
inline
double overcounting_factor(int ndim_A, int* idx_A, int* sym_A,
int ndim_B, int* idx_B, int* sym_B,
int ndim_C, int* idx_C, int* sym_C)
double overcounting_factor(int ndim_A, const int* idx_A, const int* sym_A,
int ndim_B, const int* idx_B, const int* sym_B,
int ndim_C, const int* idx_C, const int* sym_C)
{
int fact = 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment