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
a81e29f8
Commit
a81e29f8
authored
8 years ago
by
Mathieu Faverge
Browse files
Options
Downloads
Patches
Plain Diff
Add spmPrint function
parent
6f7a562f
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
spm.c
+39
-0
39 additions, 0 deletions
spm.c
spm.h
+2
-0
2 additions, 0 deletions
spm.h
z_spm_print.c
+1
-1
1 addition, 1 deletion
z_spm_print.c
with
42 additions
and
1 deletion
spm.c
+
39
−
0
View file @
a81e29f8
...
@@ -766,6 +766,45 @@ spmCopy( const pastix_spm_t *spm )
...
@@ -766,6 +766,45 @@ spmCopy( const pastix_spm_t *spm )
return
newspm
;
return
newspm
;
}
}
/**
*******************************************************************************
*
* @ingroup pastix_spm
*
* @brief Print an spm matrix into into a given file.
*
*******************************************************************************
*
* @param[in] f
* File to print the spm matrix
*
* @param[in] spm
* The sparse matrix to copy.
*
*******************************************************************************/
void
spmPrint
(
FILE
*
f
,
const
pastix_spm_t
*
spm
)
{
switch
(
spm
->
flttype
)
{
case
PastixPattern
:
//return p_f, spmPrint(f, spm);
break
;
case
PastixFloat
:
s_spmPrint
(
f
,
spm
);
break
;
case
PastixComplex32
:
c_spmPrint
(
f
,
spm
);
break
;
case
PastixComplex64
:
z_spmPrint
(
f
,
spm
);
break
;
case
PastixDouble
:
default:
d_spmPrint
(
f
,
spm
);
}
}
/**
/**
*******************************************************************************
*******************************************************************************
*
*
...
...
This diff is collapsed.
Click to expand it.
spm.h
+
2
−
0
View file @
a81e29f8
...
@@ -136,6 +136,8 @@ static inline void s_spmPrintElt( FILE *f, pastix_int_t i, pastix_int_t j, float
...
@@ -136,6 +136,8 @@ static inline void s_spmPrintElt( FILE *f, pastix_int_t i, pastix_int_t j, float
int
spmLoad
(
pastix_spm_t
*
spm
,
FILE
*
infile
);
int
spmLoad
(
pastix_spm_t
*
spm
,
FILE
*
infile
);
int
spmSave
(
pastix_spm_t
*
spm
,
FILE
*
outfile
);
int
spmSave
(
pastix_spm_t
*
spm
,
FILE
*
outfile
);
void
spmPrint
(
FILE
*
f
,
const
pastix_spm_t
*
spm
);
int
spmGenRHS
(
int
type
,
int
nrhs
,
const
pastix_spm_t
*
spm
,
void
*
x
,
int
ldx
,
void
*
b
,
int
ldb
);
int
spmGenRHS
(
int
type
,
int
nrhs
,
const
pastix_spm_t
*
spm
,
void
*
x
,
int
ldx
,
void
*
b
,
int
ldb
);
int
spmCheckAxb
(
int
nrhs
,
const
pastix_spm_t
*
spm
,
void
*
x0
,
int
ldx0
,
void
*
b
,
int
ldb
,
const
void
*
x
,
int
ldx
);
int
spmCheckAxb
(
int
nrhs
,
const
pastix_spm_t
*
spm
,
void
*
x0
,
int
ldx0
,
void
*
b
,
int
ldb
,
const
void
*
x
,
int
ldx
);
...
...
This diff is collapsed.
Click to expand it.
z_spm_print.c
+
1
−
1
View file @
a81e29f8
...
@@ -32,7 +32,7 @@ z_spmCSCPrint( FILE *f, const pastix_spm_t *spm )
...
@@ -32,7 +32,7 @@ z_spmCSCPrint( FILE *f, const pastix_spm_t *spm )
pastix_complex64_t
*
valptr
;
pastix_complex64_t
*
valptr
;
pastix_int_t
*
colptr
,
*
rowptr
,
*
dofs
;
pastix_int_t
*
colptr
,
*
rowptr
,
*
dofs
;
assert
(
(
spm
->
fmttype
==
PastixCSC
)
||
(
spm
->
fmttype
==
PastixCSR
)
);
assert
(
spm
->
fmttype
==
PastixCSC
);
assert
(
spm
->
flttype
==
PastixComplex64
);
assert
(
spm
->
flttype
==
PastixComplex64
);
baseval
=
spmFindBase
(
spm
);
baseval
=
spmFindBase
(
spm
);
...
...
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