~ubuntu-branches/ubuntu/wily/grass/wily

« back to all changes in this revision

Viewing changes to lib/external/ccmath/otrma.c

Tags: 7.0.0~rc1+ds1-1~exp1
* New upstream release candidate.
* Repack upstream tarball, remove precompiled Python objects.
* Add upstream metadata.
* Update gbp.conf and Vcs-Git URL to use the experimental branch.
* Update watch file for GRASS 7.0.
* Drop build dependencies for Tcl/Tk, add build dependencies:
  python-numpy, libnetcdf-dev, netcdf-bin, libblas-dev, liblapack-dev
* Update Vcs-Browser URL to use cgit instead of gitweb.
* Update paths to use grass70.
* Add configure options: --with-netcdf, --with-blas, --with-lapack,
  remove --with-tcltk-includes.
* Update patches for GRASS 7.
* Update copyright file, changes:
  - Update copyright years
  - Group files by license
  - Remove unused license sections
* Add patches for various typos.
* Fix desktop file with patch instead of d/rules.
* Use minimal dh rules.
* Bump Standards-Version to 3.9.6, no changes.
* Use dpkg-maintscript-helper to replace directories with symlinks.
  (closes: #776349)
* Update my email to use @debian.org address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*  otrma.c    CCMATH mathematics library source code.
 
2
 *
 
3
 *  Copyright (C)  2000   Daniel A. Atkinson    All rights reserved.
 
4
 *  This code may be redistributed under the terms of the GNU library
 
5
 *  public license (LGPL). ( See the lgpl.license file for details.)
 
6
 * ------------------------------------------------------------------------
 
7
 */
 
8
#include <stdlib.h>
 
9
void otrma(double *c, double *a, double *b, int n)
 
10
{
 
11
    double z, *q0, *p, *s, *t;
 
12
 
 
13
    int i, j, k;
 
14
 
 
15
    q0 = (double *)calloc(n, sizeof(double));
 
16
    for (i = 0; i < n; ++i, ++c) {
 
17
        for (j = 0, t = b; j < n; ++j) {
 
18
            for (k = 0, s = a + i * n, z = 0.; k < n; ++k)
 
19
                z += *t++ * *s++;
 
20
            q0[j] = z;
 
21
        }
 
22
        for (j = 0, p = c, t = a; j < n; ++j, p += n) {
 
23
            for (k = 0, s = q0, z = 0.; k < n; ++k)
 
24
                z += *t++ * *s++;
 
25
            *p = z;
 
26
        }
 
27
    }
 
28
    free(q0);
 
29
}