Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
spm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
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
solverstack
spm
Commits
5bf3f770
Commit
5bf3f770
authored
7 years ago
by
Mathieu Faverge
Browse files
Options
Downloads
Patches
Plain Diff
Fix complex hermitian conversion test
parent
b8979792
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
z_spm_convert_to_csc.c
+9
-5
9 additions, 5 deletions
z_spm_convert_to_csc.c
z_spm_convert_to_csr.c
+9
-5
9 additions, 5 deletions
z_spm_convert_to_csr.c
with
18 additions
and
10 deletions
z_spm_convert_to_csc.c
+
9
−
5
View file @
5bf3f770
...
...
@@ -160,11 +160,15 @@ z_spmConvertCSR2CSC( pastix_spm_t *spm )
{
/* Similar to PastixSymmetric case with conjugate of the values */
pastix_complex64_t
*
valptr
=
spm
->
values
;
pastix_int_t
i
;
for
(
i
=
0
;
i
<
spm
->
nnz
;
i
++
,
valptr
++
){
if
(
spm
->
rowptr
[
i
]
!=
spm
->
colptr
[
i
])
{
*
valptr
=
conj
(
*
valptr
);
pastix_int_t
*
colptr
=
spm
->
colptr
;
pastix_int_t
*
rowptr
=
spm
->
rowptr
;
pastix_int_t
i
,
j
;
for
(
i
=
0
;
i
<
spm
->
n
;
i
++
,
rowptr
++
){
for
(
j
=
rowptr
[
0
];
j
<
rowptr
[
1
];
j
++
,
colptr
++
,
valptr
++
)
{
if
(
*
colptr
!=
i
)
{
*
valptr
=
conj
(
*
valptr
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
z_spm_convert_to_csr.c
+
9
−
5
View file @
5bf3f770
...
...
@@ -51,11 +51,15 @@ z_spmConvertCSC2CSR( pastix_spm_t *spm )
{
/* Similar to PastixSymmetric case with conjugate of the values */
pastix_complex64_t
*
valptr
=
spm
->
values
;
pastix_int_t
i
;
for
(
i
=
0
;
i
<
spm
->
nnz
;
i
++
,
valptr
++
){
if
(
spm
->
rowptr
[
i
]
!=
spm
->
colptr
[
i
])
{
*
valptr
=
conj
(
*
valptr
);
pastix_int_t
*
colptr
=
spm
->
colptr
;
pastix_int_t
*
rowptr
=
spm
->
rowptr
;
pastix_int_t
i
,
j
;
for
(
j
=
0
;
j
<
spm
->
n
;
j
++
,
colptr
++
){
for
(
i
=
colptr
[
0
];
i
<
colptr
[
1
];
i
++
,
rowptr
++
,
valptr
++
)
{
if
(
*
rowptr
!=
j
)
{
*
valptr
=
conj
(
*
valptr
);
}
}
}
}
...
...
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