Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NP_TMcode
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Giacomo Mulas
NP_TMcode
Commits
7a890ae7
Commit
7a890ae7
authored
2 months ago
by
Giovanni La Mura
Browse files
Options
Downloads
Patches
Plain Diff
Makw W matrix contiguous
parent
3c7665e8
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/trapping/cfrfme.cpp
+6
-14
6 additions, 14 deletions
src/trapping/cfrfme.cpp
with
6 additions
and
14 deletions
src/trapping/cfrfme.cpp
+
6
−
14
View file @
7a890ae7
...
@@ -77,7 +77,6 @@ void frfme(string data_file, string output_path) {
...
@@ -77,7 +77,6 @@ void frfme(string data_file, string output_path) {
Swap2
*
tt2
=
NULL
;
Swap2
*
tt2
=
NULL
;
char
namef
[
7
];
char
namef
[
7
];
char
more
;
char
more
;
dcomplex
**
w
=
NULL
;
dcomplex
*
wk
=
NULL
;
dcomplex
*
wk
=
NULL
;
const
dcomplex
cc0
=
0.0
+
0.0
*
I
;
const
dcomplex
cc0
=
0.0
+
0.0
*
I
;
const
dcomplex
uim
=
0.0
+
1.0
*
I
;
const
dcomplex
uim
=
0.0
+
1.0
*
I
;
...
@@ -375,22 +374,17 @@ void frfme(string data_file, string output_path) {
...
@@ -375,22 +374,17 @@ void frfme(string data_file, string output_path) {
#ifdef USE_NVTX
#ifdef USE_NVTX
nvtxRangePop
();
nvtxRangePop
();
#endif
#endif
dcomplex
*
vec_w
=
new
dcomplex
[
nkv
*
nkv
]();
dcomplex
**
w
=
new
dcomplex
*
[
nkv
];
for
(
int
wi
=
0
;
wi
<
nkv
;
wi
++
)
w
[
wi
]
=
vec_w
+
wi
*
nkv
;
#ifdef USE_NVTX
#ifdef USE_NVTX
nvtxRangePush
(
"j80 loop"
);
nvtxRangePush
(
"j80 loop"
);
#endif
#endif
for
(
int
j80
=
jlmf
;
j80
<=
jlml
;
j80
++
)
{
for
(
int
j80
=
jlmf
;
j80
<=
jlml
;
j80
++
)
{
dcomplex
*
tt1_wk
=
tt1
->
get_vector
();
int
wk_index
=
0
;
int
wk_index
=
0
;
// w matrix
if
(
w
!=
NULL
)
{
for
(
int
wi
=
nkv
-
1
;
wi
>
-
1
;
wi
--
)
delete
[]
w
[
wi
];
delete
[]
w
;
}
w
=
new
dcomplex
*
[
nkv
];
for
(
int
wi
=
0
;
wi
<
nkv
;
wi
++
)
w
[
wi
]
=
new
dcomplex
[
nkv
]();
for
(
int
jy50
=
0
;
jy50
<
nkv
;
jy50
++
)
{
for
(
int
jy50
=
0
;
jy50
<
nkv
;
jy50
++
)
{
for
(
int
jx50
=
0
;
jx50
<
nkv
;
jx50
++
)
{
for
(
int
jx50
=
0
;
jx50
<
nkv
;
jx50
++
)
{
for
(
int
wi
=
0
;
wi
<
nlmmt
;
wi
++
)
wk
[
wi
]
=
tt1_wk
[
wk_index
++
];
for
(
int
wi
=
0
;
wi
<
nlmmt
;
wi
++
)
wk
[
wi
]
=
tt1
->
vec
_wk
[
wk_index
++
];
w
[
jx50
][
jy50
]
=
wk
[
j80
-
1
];
w
[
jx50
][
jy50
]
=
wk
[
j80
-
1
];
}
// jx50
}
// jx50
}
// jy50 loop
}
// jy50 loop
...
@@ -426,6 +420,8 @@ void frfme(string data_file, string output_path) {
...
@@ -426,6 +420,8 @@ void frfme(string data_file, string output_path) {
}
// iy70 loop
}
// iy70 loop
}
// iz75 loop
}
// iz75 loop
}
// j80 loop
}
// j80 loop
delete
[]
vec_w
;
delete
[]
w
;
#ifdef USE_NVTX
#ifdef USE_NVTX
nvtxRangePop
();
nvtxRangePop
();
#endif
#endif
...
@@ -467,10 +463,6 @@ void frfme(string data_file, string output_path) {
...
@@ -467,10 +463,6 @@ void frfme(string data_file, string output_path) {
if
(
tfrfme
!=
NULL
)
delete
tfrfme
;
if
(
tfrfme
!=
NULL
)
delete
tfrfme
;
delete
[]
file_lines
;
delete
[]
file_lines
;
if
(
tt2
!=
NULL
)
delete
tt2
;
if
(
tt2
!=
NULL
)
delete
tt2
;
if
(
w
!=
NULL
)
{
for
(
int
wi
=
nkv
-
1
;
wi
>
-
1
;
wi
--
)
delete
[]
w
[
wi
];
delete
[]
w
;
}
if
(
wk
!=
NULL
)
delete
[]
wk
;
if
(
wk
!=
NULL
)
delete
[]
wk
;
if
(
tt1
!=
NULL
)
delete
tt1
;
if
(
tt1
!=
NULL
)
delete
tt1
;
#ifdef USE_NVTX
#ifdef USE_NVTX
...
...
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