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

« back to all changes in this revision

Viewing changes to dft/simd/codelets/t1fv_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:43:15 EDT 2003 */
 
22
/* Generated on Tue Mar  7 10:08:03 EST 2006 */
23
23
 
24
24
#include "codelet-dft.h"
25
25
 
26
 
/* Generated by: /homee/stevenj/cvs/fftw3.0.1/genfft/gen_twiddle_c -simd -compact -variables 4 -n 4 -name t1fv_4 -include t1f.h */
 
26
#ifdef HAVE_FMA
 
27
 
 
28
/* Generated by: ../../../genfft/gen_twiddle_c -fma -reorder-insns -schedule-for-pipeline -simd -compact -variables 4 -pipeline-latency 8 -n 4 -name t1fv_4 -include t1f.h */
 
29
 
 
30
/*
 
31
 * This function contains 11 FP additions, 8 FP multiplications,
 
32
 * (or, 9 additions, 6 multiplications, 2 fused multiply/add),
 
33
 * 13 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_twiddle_c.ml,v 1.14 2006-02-12 23:34:12 athena Exp $
 
40
 */
 
41
 
 
42
#include "t1f.h"
 
43
 
 
44
static const R *t1fv_4(R *ri, R *ii, const R *W, stride ios, INT m, INT dist)
 
45
{
 
46
     INT i;
 
47
     R *x;
 
48
     x = ri;
 
49
     for (i = m; i > 0; i = i - VL, x = x + (VL * dist), W = W + (TWVL * 6), MAKE_VOLATILE_STRIDE(ios)) {
 
50
          V T1, T7, T2, T5, T8, T3, T6;
 
51
          T1 = LD(&(x[0]), dist, &(x[0]));
 
52
          T7 = LD(&(x[WS(ios, 3)]), dist, &(x[WS(ios, 1)]));
 
53
          T2 = LD(&(x[WS(ios, 2)]), dist, &(x[0]));
 
54
          T5 = LD(&(x[WS(ios, 1)]), dist, &(x[WS(ios, 1)]));
 
55
          T8 = BYTWJ(&(W[TWVL * 4]), T7);
 
56
          T3 = BYTWJ(&(W[TWVL * 2]), T2);
 
57
          T6 = BYTWJ(&(W[0]), T5);
 
58
          {
 
59
               V Ta, T4, Tb, T9;
 
60
               Ta = VADD(T1, T3);
 
61
               T4 = VSUB(T1, T3);
 
62
               Tb = VADD(T6, T8);
 
63
               T9 = VSUB(T6, T8);
 
64
               ST(&(x[0]), VADD(Ta, Tb), dist, &(x[0]));
 
65
               ST(&(x[WS(ios, 2)]), VSUB(Ta, Tb), dist, &(x[0]));
 
66
               ST(&(x[WS(ios, 3)]), VFMAI(T9, T4), dist, &(x[WS(ios, 1)]));
 
67
               ST(&(x[WS(ios, 1)]), VFNMSI(T9, T4), dist, &(x[WS(ios, 1)]));
 
68
          }
 
69
     }
 
70
     return W;
 
71
}
 
72
 
 
73
static const tw_instr twinstr[] = {
 
74
     VTW(1),
 
75
     VTW(2),
 
76
     VTW(3),
 
77
     {TW_NEXT, VL, 0}
 
78
};
 
79
 
 
80
static const ct_desc desc = { 4, "t1fv_4", twinstr, &GENUS, {9, 6, 2, 0}, 0, 0, 0 };
 
81
 
 
82
void X(codelet_t1fv_4) (planner *p) {
 
83
     X(kdft_dit_register) (p, t1fv_4, &desc);
 
84
}
 
85
#else                           /* HAVE_FMA */
 
86
 
 
87
/* Generated by: ../../../genfft/gen_twiddle_c -simd -compact -variables 4 -pipeline-latency 8 -n 4 -name t1fv_4 -include t1f.h */
27
88
 
28
89
/*
29
90
 * This function contains 11 FP additions, 6 FP multiplications,
32
93
 */
33
94
/*
34
95
 * 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_twiddle_c.ml,v 1.7 2003/04/16 19:51:27 athena Exp $
 
96
 * $Id: algsimp.ml,v 1.9 2006-02-12 23:34:12 athena Exp $
 
97
 * $Id: fft.ml,v 1.4 2006-01-05 03:04:27 stevenj Exp $
 
98
 * $Id: gen_twiddle_c.ml,v 1.14 2006-02-12 23:34:12 athena Exp $
38
99
 */
39
100
 
40
101
#include "t1f.h"
41
102
 
42
 
static const R *t1fv_4(R *ri, R *ii, const R *W, stride ios, int m, int dist)
 
103
static const R *t1fv_4(R *ri, R *ii, const R *W, stride ios, INT m, INT dist)
43
104
{
44
 
     int i;
 
105
     INT i;
45
106
     R *x;
46
107
     x = ri;
47
 
     BEGIN_SIMD();
48
 
     for (i = m; i > 0; i = i - VL, x = x + (VL * dist), W = W + (TWVL * 6)) {
 
108
     for (i = m; i > 0; i = i - VL, x = x + (VL * dist), W = W + (TWVL * 6), MAKE_VOLATILE_STRIDE(ios)) {
49
109
          V T1, T8, T3, T6, T7, T2, T5;
50
110
          T1 = LD(&(x[0]), dist, &(x[0]));
51
111
          T7 = LD(&(x[WS(ios, 3)]), dist, &(x[WS(ios, 1)]));
66
126
               ST(&(x[0]), VADD(Ta, Tb), dist, &(x[0]));
67
127
          }
68
128
     }
69
 
     END_SIMD();
70
129
     return W;
71
130
}
72
131
 
77
136
     {TW_NEXT, VL, 0}
78
137
};
79
138
 
80
 
static const ct_desc desc = { 4, "t1fv_4", twinstr, {11, 6, 0, 0}, &GENUS, 0, 0, 0 };
 
139
static const ct_desc desc = { 4, "t1fv_4", twinstr, &GENUS, {11, 6, 0, 0}, 0, 0, 0 };
81
140
 
82
141
void X(codelet_t1fv_4) (planner *p) {
83
142
     X(kdft_dit_register) (p, t1fv_4, &desc);
84
143
}
 
144
#endif                          /* HAVE_FMA */