Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
a867e1fd
Commit
a867e1fd
authored
14 years ago
by
Jonathan Lambrechts
Browse files
Options
Downloads
Patches
Plain Diff
add fullMatrix::axpy
parent
74d43aac
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
Numeric/fullMatrix.cpp
+7
-0
7 additions, 0 deletions
Numeric/fullMatrix.cpp
Numeric/fullMatrix.h
+8
-0
8 additions, 0 deletions
Numeric/fullMatrix.h
with
15 additions
and
0 deletions
Numeric/fullMatrix.cpp
+
7
−
0
View file @
a867e1fd
...
...
@@ -111,6 +111,13 @@ void fullMatrix<std::complex<double> >::gemm(const fullMatrix<std::complex<doubl
&
beta
,
_data
,
&
LDC
);
}
template
<
>
void
fullMatrix
<
double
>::
axpy
(
const
fullMatrix
<
double
>
&
x
,
double
alpha
)
{
int
M
=
_r
*
_c
,
INCX
=
1
,
INCY
=
1
;
F77NAME
(
daxpy
)(
&
M
,
&
alpha
,
x
.
_data
,
&
INCX
,
_data
,
&
INCY
);
}
template
<
>
void
fullMatrix
<
double
>::
mult
(
const
fullVector
<
double
>
&
x
,
fullVector
<
double
>
&
y
)
const
{
...
...
This diff is collapsed.
Click to expand it.
Numeric/fullMatrix.h
+
8
−
0
View file @
a867e1fd
...
...
@@ -329,6 +329,14 @@ class fullMatrix
{
for
(
int
i
=
0
;
i
<
_r
*
_c
;
i
++
)
_data
[
i
]
*=
a
.
_data
[
i
];
}
void
axpy
(
const
fullMatrix
<
scalar
>
&
x
,
scalar
alpha
=
1.
)
#if !defined(HAVE_BLAS)
{
int
n
=
_r
*
_c
;
for
(
int
i
=
0
;
i
<
n
;
i
++
)
_data
[
i
]
+=
alpha
*
x
.
_data
[
i
];
}
#endif
;
void
gemm_naive
(
const
fullMatrix
<
scalar
>
&
a
,
const
fullMatrix
<
scalar
>
&
b
,
scalar
alpha
=
1.
,
scalar
beta
=
1.
)
{
...
...
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