Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
cc4s
Cyclops Tensor Framework
Commits
b818f3db
Commit
b818f3db
authored
11 years ago
by
Edgar Solomonik
Browse files
Options
Download
Plain Diff
Merge branch 'master' of repo.eecs.berkeley.edu:users/solomon/ctf
parents
977368d9
a5e7f40e
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
14 deletions
+16
-14
src/dist_tensor/cyclopstf.cxx
src/dist_tensor/cyclopstf.cxx
+1
-1
src/dist_tensor/dist_tensor_internal.cxx
src/dist_tensor/dist_tensor_internal.cxx
+7
-5
src/dist_tensor/sym_indices.hxx
src/dist_tensor/sym_indices.hxx
+8
-8
No files found.
src/dist_tensor/cyclopstf.cxx
View file @
b818f3db
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
src/dist_tensor/dist_tensor_internal.cxx
View file @
b818f3db
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
src/dist_tensor/sym_indices.hxx
View file @
b818f3db
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment