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
blob6c85a0114cfdd25967925ecfa416aaf86bfc09ba
1 #include "gmx_blas.h"
3 void
4 F77_FUNC(sscal,SSCAL)(int *n__,
5 float *fact__,
6 float *dx,
7 int *incx__)
9 int nincx,i;
11 int n = *n__;
12 float fact = *fact__;
13 int incx = *incx__;
15 if(n<=0 || incx<=0)
16 return;
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;
27 /* continue with current value of i */
28 for(;i<n;i++)
29 dx[i] *= fact;
31 return;
32 } else {
33 /* inc != 1 */
34 nincx = n * (incx);
35 for (i=0;i<nincx;i+=incx)
36 dx[i] *= fact;
38 return;