File: spread.c

package info (click to toggle)
python-ltfatpy 1.1.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 41,412 kB
  • sloc: ansic: 8,546; python: 6,470; makefile: 15
file content (36 lines) | stat: -rw-r--r-- 695 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* NOT PROCESSED DIRECTLY, see ltfat_complexindependent.c */
#ifdef LTFAT_TYPE
#include "ltfat.h"

LTFAT_EXTERN void
LTFAT_NAME(col2diag)(const LTFAT_TYPE *cin, const ltfatInt L,
                     LTFAT_TYPE *cout)
{
    ltfatInt ii;

    LTFAT_TYPE *pcout;
    const LTFAT_TYPE *pcin;

    pcout=cout;
    const ltfatInt Lp1=L+1;
    for (ltfatInt jj=0; jj<L; jj++)
    {
        pcin=cin+(L-jj)*L;
        for (ii=0; ii<jj; ii++)
        {
            (*pcout) = (*pcin);
            pcout++;
            pcin+=Lp1;
        }
        pcin-=L*L;
        for (ii=jj; ii<L; ii++)
        {
            (*pcout) = (*pcin);
            pcout++;
            pcin+=Lp1;
        }
    }

}

#endif