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
Admin message
GitLab upgrade completed. Current version is 17.11.3.
Show more breadcrumbs
solverstack
spm
Commits
78ae1e1d
Commit
78ae1e1d
authored
7 years ago
by
Mathieu Faverge
Browse files
Options
Downloads
Patches
Plain Diff
Remove spmScalRHS and change spmScalVector API
parent
beaaab4d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
spm.c
+18
-63
18 additions, 63 deletions
spm.c
spm.h
+1
-2
1 addition, 2 deletions
spm.h
with
19 additions
and
65 deletions
spm.c
+
18
−
63
View file @
78ae1e1d
...
...
@@ -1311,95 +1311,50 @@ spmScalMatrix(double alpha, pastix_spm_t* spm)
*
*******************************************************************************
*
* @param[in] alpha
* The scaling parameter.
*
* @param[in] spm
* The spm structure to know the type of the vector.
*
* @param[inout] x
* The vector to scal.
*
*******************************************************************************/
void
spmScalVector
(
double
alpha
,
pastix_spm_t
*
spm
,
void
*
x
)
{
switch
(
spm
->
flttype
)
{
case
PastixPattern
:
break
;
case
PastixFloat
:
cblas_sscal
(
spm
->
n
,
(
float
)
alpha
,
x
,
1
);
break
;
case
PastixComplex32
:
cblas_csscal
(
spm
->
n
,
(
float
)
alpha
,
x
,
1
);
break
;
case
PastixComplex64
:
cblas_zdscal
(
spm
->
n
,
alpha
,
x
,
1
);
break
;
case
PastixDouble
:
default:
cblas_dscal
(
spm
->
n
,
alpha
,
x
,
1
);
}
}
/**
*******************************************************************************
*
* @brief Scale a dense matrix corresponding to a set of RHS (wrapper to
* LAPACKE_xlascl)
*
* A = alpha * A
*
*******************************************************************************
*
* @param[in] flt
* Datatype of the
matrix
that must be:
* Datatype of the
elements in the vector
that must be:
* @arg PastixFloat
* @arg PastixDouble
* @arg PastixComplex32
* @arg PastixComplex64
*
* @param[in] m
* Number of rows of the matrix A.
*
* @param[in] n
* Number of
columns of the matrix A.
* Number of
elements in the input vectors
*
* @param[in] alpha
* The scaling parameter.
*
The scaling parameter.
*
* @param[inout] A
* The dense matrix to scale of size lda-by-n
* @param[inout] x
* The vector to scal of size ( 1 + (n-1) * abs(incx) ), and of type
* defined by flt.
*
* @param[in]
lda
*
Defines the leading dimension of A. lda >= m
.
* @param[in]
inc
*
Storage spacing between elements of x
.
*
*******************************************************************************/
void
spmScalRHS
(
pastix_coeftype_t
flt
,
double
alpha
,
pastix_int_t
m
,
pastix_int_t
n
,
void
*
A
,
pastix_int_t
lda
)
spmScalVector
(
pastix_coeftype_t
flt
,
double
alpha
,
pastix_int_t
n
,
void
*
x
,
pastix_int_t
inc
)
{
switch
(
flt
)
switch
(
spm
->
flttype
)
{
case
PastixPattern
:
break
;
case
PastixFloat
:
LAPACKE_slascl_work
(
LAPACK_COL_MAJOR
,
'G'
,
0
,
0
,
1
.,
alpha
,
m
,
n
,
A
,
lda
);
cblas_sscal
(
n
,
(
float
)
alpha
,
x
,
incx
);
break
;
case
PastixComplex32
:
LAPACKE_clascl_work
(
LAPACK_COL_MAJOR
,
'G'
,
0
,
0
,
1
.,
alpha
,
m
,
n
,
A
,
lda
);
cblas_csscal
(
n
,
(
float
)
alpha
,
x
,
incx
);
break
;
case
PastixComplex64
:
LAPACKE_zlascl_work
(
LAPACK_COL_MAJOR
,
'G'
,
0
,
0
,
1
.
,
alpha
,
m
,
n
,
A
,
lda
);
cblas_zdscal
(
n
,
alpha
,
x
,
incx
);
break
;
case
PastixDouble
:
default:
LAPACKE_dlascl_work
(
LAPACK_COL_MAJOR
,
'G'
,
0
,
0
,
1
.
,
alpha
,
m
,
n
,
A
,
lda
);
cblas_dscal
(
n
,
alpha
,
x
,
incx
);
}
}
...
...
This diff is collapsed.
Click to expand it.
spm.h
+
1
−
2
View file @
78ae1e1d
...
...
@@ -97,8 +97,7 @@ int spmMatMat( pastix_trans_t trans, pastix_int_t n,
const
void
*
B
,
pastix_int_t
ldb
,
const
void
*
beta
,
void
*
C
,
pastix_int_t
ldc
);
void
spmScalMatrix
(
double
alpha
,
pastix_spm_t
*
spm
);
void
spmScalVector
(
double
alpha
,
pastix_spm_t
*
spm
,
void
*
x
);
void
spmScalRHS
(
pastix_coeftype_t
flt
,
double
alpha
,
pastix_int_t
m
,
pastix_int_t
n
,
void
*
A
,
pastix_int_t
lda
);
void
spmScalVector
(
pastix_coeftype_t
flt
,
double
alpha
,
pastix_int_t
n
,
void
*
x
,
pastix_int_t
incx
);
/**
* @}
...
...
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