repo.or.cz
/
gromacs
/
rigid-bodies.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Updated intel syntax x86-64 asm files to also support MS win64 call convention (ifdef...
[gromacs/rigid-bodies.git]
/
src
/
gmxlib
/
gmx_blas
/
sscal.c
blob
6c85a0114cfdd25967925ecfa416aaf86bfc09ba
1
#include
"gmx_blas.h"
2
3
void
4
F77_FUNC
(
sscal
,
SSCAL
)(
int
*
n__
,
5
float
*
fact__
,
6
float
*
dx
,
7
int
*
incx__
)
8
{
9
int
nincx
,
i
;
10
11
int
n
= *
n__
;
12
float
fact
= *
fact__
;
13
int
incx
= *
incx__
;
14
15
if
(
n
<=
0
||
incx
<=
0
)
16
return
;
17
18
if
(
incx
==
1
) {
19
/* Unrool factor 5 */
20
for
(
i
=
0
;
i
<(
n
-
5
);
i
+=
5
) {
21
dx
[
i
] *=
fact
;
22
dx
[
i
+
1
] *=
fact
;
23
dx
[
i
+
2
] *=
fact
;
24
dx
[
i
+
3
] *=
fact
;
25
dx
[
i
+
4
] *=
fact
;
26
}
27
/* continue with current value of i */
28
for
(;
i
<
n
;
i
++)
29
dx
[
i
] *=
fact
;
30
31
return
;
32
}
else
{
33
/* inc != 1 */
34
nincx
=
n
* (
incx
);
35
for
(
i
=
0
;
i
<
nincx
;
i
+=
incx
)
36
dx
[
i
] *=
fact
;
37
38
return
;
39
}
40
41
}