~ubuntu-branches/ubuntu/intrepid/digikam/intrepid

« back to all changes in this revision

Viewing changes to digikam/imageplugins/coreplugin/sharpnesseditor/clapack/dscal.c

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2008-07-17 20:25:39 UTC
  • mfrom: (1.3.2 upstream) (37 hardy)
  • mto: This revision was merged to the branch mainline in revision 39.
  • Revision ID: james.westby@ubuntu.com-20080717202539-1bw3w3nrsso7yj4z
* New upstream release
  - digiKam 0.9.4 Release Plan (KDE3) ~ 13 July 08 (Closes: #490144)
* DEB_CONFIGURE_EXTRA_FLAGS := --without-included-sqlite3
* Debhelper compatibility level V7
* Install pixmaps in debian/*.install
* Add debian/digikam.lintian-overrides

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "blaswrap.h"
 
2
#include "f2c.h"
 
3
 
 
4
/* Subroutine */ int dscal_(integer *n, doublereal *da, doublereal *dx, 
 
5
        integer *incx)
 
6
{
 
7
    /* System generated locals */
 
8
    integer i__1, i__2;
 
9
    /* Local variables */
 
10
    static integer i__, m, nincx, mp1;
 
11
/*     scales a vector by a constant.   
 
12
       uses unrolled loops for increment equal to one.   
 
13
       jack dongarra, linpack, 3/11/78.   
 
14
       modified 3/93 to return if incx .le. 0.   
 
15
       modified 12/3/93, array(1) declarations changed to array(*)   
 
16
       Parameter adjustments */
 
17
    --dx;
 
18
    /* Function Body */
 
19
    if (*n <= 0 || *incx <= 0) {
 
20
        return 0;
 
21
    }
 
22
    if (*incx == 1) {
 
23
        goto L20;
 
24
    }
 
25
/*        code for increment not equal to 1 */
 
26
    nincx = *n * *incx;
 
27
    i__1 = nincx;
 
28
    i__2 = *incx;
 
29
    for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) {
 
30
        dx[i__] = *da * dx[i__];
 
31
/* L10: */
 
32
    }
 
33
    return 0;
 
34
/*        code for increment equal to 1   
 
35
          clean-up loop */
 
36
L20:
 
37
    m = *n % 5;
 
38
    if (m == 0) {
 
39
        goto L40;
 
40
    }
 
41
    i__2 = m;
 
42
    for (i__ = 1; i__ <= i__2; ++i__) {
 
43
        dx[i__] = *da * dx[i__];
 
44
/* L30: */
 
45
    }
 
46
    if (*n < 5) {
 
47
        return 0;
 
48
    }
 
49
L40:
 
50
    mp1 = m + 1;
 
51
    i__2 = *n;
 
52
    for (i__ = mp1; i__ <= i__2; i__ += 5) {
 
53
        dx[i__] = *da * dx[i__];
 
54
        dx[i__ + 1] = *da * dx[i__ + 1];
 
55
        dx[i__ + 2] = *da * dx[i__ + 2];
 
56
        dx[i__ + 3] = *da * dx[i__ + 3];
 
57
        dx[i__ + 4] = *da * dx[i__ + 4];
 
58
/* L50: */
 
59
    }
 
60
    return 0;
 
61
} /* dscal_ */
 
62