1 #include <complex.h>
2 
mul0(_Complex TYPE a[restrict N],_Complex TYPE b[restrict N],_Complex TYPE c[restrict N])3 void mul0 (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
4 	   _Complex TYPE c[restrict N])
5 {
6   for (int i=0; i < N; i++)
7     c[i] = a[i] * b[i];
8 }
9 
mul90snd(_Complex TYPE a[restrict N],_Complex TYPE b[restrict N],_Complex TYPE c[restrict N])10 void mul90snd (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
11 	       _Complex TYPE c[restrict N])
12 {
13   for (int i=0; i < N; i++)
14     c[i] = a[i] * (b[i] * I);
15 }
16 
mul180snd(_Complex TYPE a[restrict N],_Complex TYPE b[restrict N],_Complex TYPE c[restrict N])17 void mul180snd (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
18 	        _Complex TYPE c[restrict N])
19 {
20   for (int i=0; i < N; i++)
21     c[i] = a[i] * (b[i] * I * I);
22 }
23 
mul270snd(_Complex TYPE a[restrict N],_Complex TYPE b[restrict N],_Complex TYPE c[restrict N])24 void mul270snd (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
25 	        _Complex TYPE c[restrict N])
26 {
27   for (int i=0; i < N; i++)
28     c[i] = a[i] * (b[i] * I * I * I);
29 }
30 
mul90fst(_Complex TYPE a[restrict N],_Complex TYPE b[restrict N],_Complex TYPE c[restrict N])31 void mul90fst (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
32 	       _Complex TYPE c[restrict N])
33 {
34   for (int i=0; i < N; i++)
35     c[i] = (a[i] * I) * b[i];
36 }
37 
mul180fst(_Complex TYPE a[restrict N],_Complex TYPE b[restrict N],_Complex TYPE c[restrict N])38 void mul180fst (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
39 	        _Complex TYPE c[restrict N])
40 {
41   for (int i=0; i < N; i++)
42     c[i] = (a[i] * I * I) * b[i];
43 }
44 
mul270fst(_Complex TYPE a[restrict N],_Complex TYPE b[restrict N],_Complex TYPE c[restrict N])45 void mul270fst (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
46 	        _Complex TYPE c[restrict N])
47 {
48   for (int i=0; i < N; i++)
49     c[i] = (a[i] * I * I * I) * b[i];
50 }
51 
mulconjfst(_Complex TYPE a[restrict N],_Complex TYPE b[restrict N],_Complex TYPE c[restrict N])52 void mulconjfst (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
53 		 _Complex TYPE c[restrict N])
54 {
55   for (int i=0; i < N; i++)
56     c[i] = ~a[i] * b[i];
57 }
58 
mulconjsnd(_Complex TYPE a[restrict N],_Complex TYPE b[restrict N],_Complex TYPE c[restrict N])59 void mulconjsnd (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
60 		 _Complex TYPE c[restrict N])
61 {
62   for (int i=0; i < N; i++)
63     c[i] = a[i] * ~b[i];
64 }
65 
mulconjboth(_Complex TYPE a[restrict N],_Complex TYPE b[restrict N],_Complex TYPE c[restrict N])66 void mulconjboth (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
67 		  _Complex TYPE c[restrict N])
68 {
69   for (int i=0; i < N; i++)
70     c[i] = ~a[i] * ~b[i];
71 }
72