~ubuntu-branches/ubuntu/raring/fftw3/raring-proposed

« back to all changes in this revision

Viewing changes to dft/simd/codelets/n1fv_4.c

  • Committer: Bazaar Package Importer
  • Author(s): Paul Brossier
  • Date: 2006-05-31 13:44:05 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060531134405-ol9hrbg6bh81sg0c
Tags: 3.1.1-1
* New upstream release (closes: #350327, #338487, #338501)
* Add --enable-portable-binary to use -mtune instead of -march
* Use --with-gcc-arch=G5 / pentium4 on powerpc / i386
* Updated Standards-Version

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (c) 2003 Matteo Frigo
3
 
 * Copyright (c) 2003 Massachusetts Institute of Technology
 
2
 * Copyright (c) 2003, 2006 Matteo Frigo
 
3
 * Copyright (c) 2003, 2006 Massachusetts Institute of Technology
4
4
 *
5
5
 * This program is free software; you can redistribute it and/or modify
6
6
 * it under the terms of the GNU General Public License as published by
19
19
 */
20
20
 
21
21
/* This file was automatically generated --- DO NOT EDIT */
22
 
/* Generated on Sat Jul  5 21:40:06 EDT 2003 */
 
22
/* Generated on Tue Mar  7 09:46:58 EST 2006 */
23
23
 
24
24
#include "codelet-dft.h"
25
25
 
26
 
/* Generated by: /homee/stevenj/cvs/fftw3.0.1/genfft/gen_notw_c -simd -compact -variables 4 -n 4 -name n1fv_4 -include n1f.h */
 
26
#ifdef HAVE_FMA
 
27
 
 
28
/* Generated by: ../../../genfft/gen_notw_c -fma -reorder-insns -schedule-for-pipeline -simd -compact -variables 4 -pipeline-latency 8 -n 4 -name n1fv_4 -include n1f.h */
 
29
 
 
30
/*
 
31
 * This function contains 8 FP additions, 2 FP multiplications,
 
32
 * (or, 6 additions, 0 multiplications, 2 fused multiply/add),
 
33
 * 11 stack variables, and 8 memory accesses
 
34
 */
 
35
/*
 
36
 * Generator Id's : 
 
37
 * $Id: algsimp.ml,v 1.9 2006-02-12 23:34:12 athena Exp $
 
38
 * $Id: fft.ml,v 1.4 2006-01-05 03:04:27 stevenj Exp $
 
39
 * $Id: gen_notw_c.ml,v 1.17 2006-02-12 23:34:12 athena Exp $
 
40
 */
 
41
 
 
42
#include "n1f.h"
 
43
 
 
44
static void n1fv_4(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs)
 
45
{
 
46
     INT i;
 
47
     const R *xi;
 
48
     R *xo;
 
49
     xi = ri;
 
50
     xo = ro;
 
51
     for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs), MAKE_VOLATILE_STRIDE(is), MAKE_VOLATILE_STRIDE(os)) {
 
52
          V T1, T2, T4, T5;
 
53
          T1 = LD(&(xi[0]), ivs, &(xi[0]));
 
54
          T2 = LD(&(xi[WS(is, 2)]), ivs, &(xi[0]));
 
55
          T4 = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)]));
 
56
          T5 = LD(&(xi[WS(is, 3)]), ivs, &(xi[WS(is, 1)]));
 
57
          {
 
58
               V T3, T7, T6, T8;
 
59
               T3 = VSUB(T1, T2);
 
60
               T7 = VADD(T1, T2);
 
61
               T6 = VSUB(T4, T5);
 
62
               T8 = VADD(T4, T5);
 
63
               ST(&(xo[WS(os, 2)]), VSUB(T7, T8), ovs, &(xo[0]));
 
64
               ST(&(xo[0]), VADD(T7, T8), ovs, &(xo[0]));
 
65
               ST(&(xo[WS(os, 3)]), VFMAI(T6, T3), ovs, &(xo[WS(os, 1)]));
 
66
               ST(&(xo[WS(os, 1)]), VFNMSI(T6, T3), ovs, &(xo[WS(os, 1)]));
 
67
          }
 
68
     }
 
69
}
 
70
 
 
71
static const kdft_desc desc = { 4, "n1fv_4", {6, 0, 2, 0}, &GENUS, 0, 0, 0, 0 };
 
72
void X(codelet_n1fv_4) (planner *p) {
 
73
     X(kdft_register) (p, n1fv_4, &desc);
 
74
}
 
75
 
 
76
#else                           /* HAVE_FMA */
 
77
 
 
78
/* Generated by: ../../../genfft/gen_notw_c -simd -compact -variables 4 -pipeline-latency 8 -n 4 -name n1fv_4 -include n1f.h */
27
79
 
28
80
/*
29
81
 * This function contains 8 FP additions, 0 FP multiplications,
32
84
 */
33
85
/*
34
86
 * Generator Id's : 
35
 
 * $Id: algsimp.ml,v 1.7 2003/03/15 20:29:42 stevenj Exp $
36
 
 * $Id: fft.ml,v 1.2 2003/03/15 20:29:42 stevenj Exp $
37
 
 * $Id: gen_notw_c.ml,v 1.9 2003/04/16 21:21:53 athena Exp $
 
87
 * $Id: algsimp.ml,v 1.9 2006-02-12 23:34:12 athena Exp $
 
88
 * $Id: fft.ml,v 1.4 2006-01-05 03:04:27 stevenj Exp $
 
89
 * $Id: gen_notw_c.ml,v 1.17 2006-02-12 23:34:12 athena Exp $
38
90
 */
39
91
 
40
92
#include "n1f.h"
41
93
 
42
 
static void n1fv_4(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, int v, int ivs, int ovs)
 
94
static void n1fv_4(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs)
43
95
{
44
 
     int i;
 
96
     INT i;
45
97
     const R *xi;
46
98
     R *xo;
47
99
     xi = ri;
48
100
     xo = ro;
49
 
     BEGIN_SIMD();
50
 
     for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs)) {
 
101
     for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs), MAKE_VOLATILE_STRIDE(is), MAKE_VOLATILE_STRIDE(os)) {
51
102
          V T3, T7, T6, T8;
52
103
          {
53
104
               V T1, T2, T4, T5;
65
116
          ST(&(xo[WS(os, 3)]), VADD(T3, T6), ovs, &(xo[WS(os, 1)]));
66
117
          ST(&(xo[WS(os, 2)]), VSUB(T7, T8), ovs, &(xo[0]));
67
118
     }
68
 
     END_SIMD();
69
119
}
70
120
 
71
121
static const kdft_desc desc = { 4, "n1fv_4", {8, 0, 0, 0}, &GENUS, 0, 0, 0, 0 };
72
122
void X(codelet_n1fv_4) (planner *p) {
73
123
     X(kdft_register) (p, n1fv_4, &desc);
74
124
}
 
125
 
 
126
#endif                          /* HAVE_FMA */