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
645b1d50
Commit
645b1d50
authored
6 years ago
by
KUHN Matthieu
Committed by
Mathieu Faverge
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Slightly modified for consistency with dof matvec tests
parent
165ca9f4
No related branches found
No related tags found
1 merge request
!4
Feature/matvec 4all
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/spm_matvec_tests.c
+18
-18
18 additions, 18 deletions
tests/spm_matvec_tests.c
with
18 additions
and
18 deletions
tests/spm_matvec_tests.c
+
18
−
18
View file @
645b1d50
...
...
@@ -39,14 +39,14 @@ int s_spm_matvec_check( int trans, const spmatrix_t *spm );
char
*
fltnames
[]
=
{
"Pattern"
,
""
,
"Float"
,
"Double"
,
"Complex32"
,
"Complex64"
};
char
*
transnames
[]
=
{
"NoTrans"
,
"Trans"
,
"ConjTrans"
};
char
*
mtxnames
[]
=
{
"General"
,
"Symmetric"
,
"Hermitian"
};
char
*
mt
xfmt
s
[]
=
{
"CSC"
,
"CSR"
,
"IJV"
};
char
*
f
mt
name
s
[]
=
{
"CSC"
,
"CSR"
,
"IJV"
};
int
main
(
int
argc
,
char
**
argv
)
{
spmatrix_t
spm
;
spm_driver_t
driver
;
char
*
filename
;
int
t
,
spmtype
,
mtxtype
,
mtx
fmt
,
baseval
;
int
t
,
spmtype
,
mtxtype
,
fmt
type
,
baseval
;
int
rc
=
SPM_SUCCESS
;
int
err
=
0
;
...
...
@@ -77,24 +77,24 @@ int main (int argc, char **argv)
{
printf
(
" Baseval : %d
\n
"
,
baseval
);
spmBase
(
&
spm
,
baseval
);
for
(
mtx
fmt
=
SpmCSC
;
mtx
fmt
<=
Spm
IJV
;
mtx
fmt
++
)
for
(
mtx
type
=
SpmGeneral
;
mtx
type
<=
Spm
Hermitian
;
mtx
type
++
)
{
spmConvert
(
mtxfmt
,
&
spm
);
for
(
mtxtype
=
SpmGeneral
;
mtxtype
<=
SpmHermitian
;
mtxtype
++
)
if
(
(
mtxtype
==
SpmHermitian
)
&&
(
((
spm
.
flttype
!=
SpmComplex64
)
&&
(
spm
.
flttype
!=
SpmComplex32
))
||
(
spmtype
!=
SpmHermitian
)
)
)
{
if
(
(
mtxtype
==
SpmHermitian
)
&&
(
((
spm
.
flttype
!=
SpmComplex64
)
&&
(
spm
.
flttype
!=
SpmComplex32
))
||
(
spmtype
!=
SpmHermitian
)
)
)
{
continue
;
}
if
(
(
mtxtype
!=
SpmGeneral
)
&&
(
spmtype
==
SpmGeneral
)
)
{
continue
;
}
spm
.
mtxtype
=
mtxtype
;
continue
;
}
if
(
(
mtxtype
!=
SpmGeneral
)
&&
(
spmtype
==
SpmGeneral
)
)
{
continue
;
}
spm
.
mtxtype
=
mtxtype
;
for
(
fmttype
=
SpmCSC
;
fmttype
<=
SpmIJV
;
fmttype
++
)
{
spmConvert
(
fmttype
,
&
spm
);
for
(
t
=
SpmNoTrans
;
t
<=
SpmConjTrans
;
t
++
)
{
if
(
(
t
==
SpmConjTrans
)
&&
...
...
@@ -108,7 +108,7 @@ int main (int argc, char **argv)
}
printf
(
" Case %s - %s - %d - %s:
\n
"
,
mtxnames
[
mtxtype
-
SpmGeneral
],
mt
xfmts
[
mtxfmt
-
SpmCSC
],
mtxnames
[
mtxtype
-
SpmGeneral
],
f
mt
names
[
fmttype
-
SpmCSC
],
baseval
,
transnames
[
t
-
SpmNoTrans
]
);
switch
(
spm
.
flttype
){
...
...
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