Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TensorJoseph
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Camille Coti
TensorJoseph
Commits
0e4ebad2
Commit
0e4ebad2
authored
5 years ago
by
Camille Coti
Browse files
Options
Downloads
Patches
Plain Diff
Stuff missing from the previous commit
parent
9729a08f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/sequential.cpp
+1
-82
1 addition, 82 deletions
src/sequential.cpp
src/tensormatrix_mpi.cpp
+0
-2
0 additions, 2 deletions
src/tensormatrix_mpi.cpp
with
1 addition
and
84 deletions
src/sequential.cpp
+
1
−
82
View file @
0e4ebad2
...
...
@@ -10,88 +10,7 @@ namespace gi = GiNaC;
* Big multiplication *
*******************************************************************************/
gi
::
ex
multiply_seq
(
tensor3D_t
&
T
,
matrix_int_t
&
J
,
int
size
)
{
// simpler: same dimension everywhere
gi
::
ex
Tens
=
0
;
int
a1
,
a2
,
a3
,
b1
,
b2
,
b3
,
c1
,
c2
,
c3
,
d1
,
d2
,
d3
;
gi
::
ex
TAB
,
TABB
,
TABC
,
TABCC
,
TABCD
,
TABCDD
;
gi
::
ex
A
;
int
i
,
j
;
i
=
0
;
j
=
0
;
const
char
timerA
[]
=
"A"
;
const
char
timerB
[]
=
"B"
;
const
char
timeradd
[]
=
"add"
;
double
timeA
,
timeB
;
uint64_t
t_start
,
t_end
;
for
(
a1
=
0
;
a1
<
size
;
a1
++
){
i
=
i
+
1
;
// std::cout << "Tens: " << Tens << std::endl;
// printf("i = %d\n", i);
for
(
a2
=
0
;
a2
<
size
;
a2
++
){
j
=
j
+
1
;
// printf("j = %d\n", j);
for
(
a3
=
0
;
a3
<
size
;
a3
++
){
TAU_START
(
timerA
);
A
=
T
[
a1
][
a2
][
a3
];
/* Beyond this point, a2 and a3 are only used in the simplectic matrix */
for
(
b1
=
0
;
b1
<
size
;
b1
++
){
TAB
=
J
[
a1
][
b1
];
for
(
b2
=
0
;
b2
<
size
;
b2
++
){
for
(
b3
=
0
;
b3
<
size
;
b3
++
){
TAU_START
(
timerB
);
/* Beyond this point, b1 is not used anymore */
TABB
=
TAB
*
A
*
T
[
b1
][
b2
][
b3
];
for
(
c1
=
0
;
c1
<
size
;
c1
++
){
for
(
c2
=
0
;
c2
<
size
;
c2
++
){
TABC
=
TABB
*
J
[
a2
][
c2
];
for
(
c3
=
0
;
c3
<
size
;
c3
++
){
TABCC
=
TABC
*
T
[
c1
][
c2
][
c3
]
*
J
[
b3
][
c3
]
;
for
(
d1
=
0
;
d1
<
size
;
d1
++
){
TABCD
=
TABCC
*
J
[
c1
][
d1
];
for
(
d2
=
0
;
d2
<
size
;
d2
++
){
TABCDD
=
TABCD
*
J
[
b2
][
d2
];
for
(
d3
=
0
;
d3
<
size
;
d3
++
){
TAU_START
(
timeradd
);
t_start
=
rdtsc
();
Tens
=
Tens
+
TABCDD
*
T
[
d1
][
d2
][
d3
]
*
J
[
a3
][
d3
];
t_end
=
rdtsc
();
TAU_STOP
(
timeradd
);
#ifdef TAUPROF
// std::cout << "add " << getTimeSpent( timeradd ) << " len " << Tens.nops() << std::endl;
printf
(
"add %lf %lu len %d
\n
"
,
getTimeSpent
(
timeradd
),
t_end
-
t_start
,
Tens
.
nops
()
);
// std::cout << Tens << std::endl;
#endif // TAUPROF
}
}
}
}
}
}
TAU_STOP
(
timerB
);
#ifdef TAUPROF
std
::
cout
<<
"B "
<<
getTimeSpent
(
timeradd
)
<<
" len "
<<
Tens
.
nops
()
<<
std
::
endl
;
#endif // TAUPROF
}
}
}
TAU_STOP
(
timerA
);
#ifdef TAUPROF
std
::
cout
<<
"A "
<<
getTimeSpent
(
timeradd
)
<<
" len "
<<
Tens
.
nops
()
<<
std
::
endl
;
#endif // TAUPROF
}
}
}
return
Tens
;
}
gi
::
ex
multiply_seq2
(
tensor3D_t
&
T
,
matrix_int_t
&
J
,
int
size
)
{
gi
::
ex
multiply_seq
(
tensor3D_t
&
T
,
matrix_int_t
&
J
,
int
size
)
{
gi
::
ex
Tens
=
0
;
int
a1
,
a2
,
a3
,
a4
,
a5
,
a6
;
...
...
This diff is collapsed.
Click to expand it.
src/tensormatrix_mpi.cpp
+
0
−
2
View file @
0e4ebad2
...
...
@@ -127,8 +127,6 @@ int main( int argc, char** argv ){
init_simplectic
(
J
,
N
,
N
);
gi
::
ex
Tpar2
;
/* Compute it in parallel */
tv_start
=
getTime
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment