-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathSignal.java
More file actions
97 lines (72 loc) · 2.62 KB
/
Signal.java
File metadata and controls
97 lines (72 loc) · 2.62 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
package com.arrayfire;
class Signal {
private native static long fft(long a, int dim0);
private native static long fft2(long a, int dim0, int dim1);
private native static long fft3(long a, int dim0, int dim1, int dim2);
private native static long ifft(long a, int dim0);
private native static long ifft2(long a, int dim0, int dim1);
private native static long ifft3(long a, int dim0, int dim1, int dim2);
private native static long convolve1(long a, long b, int type);
private native static long convolve2(long a, long b, int type);
private native static long convolve3(long a, long b, int type);
public static void fft(Array res, Array a) throws Exception {
long ref = fft(a.ref, 0);
res.set(ref);
}
public static void fft(Array res, Array a, int dim0) throws Exception {
long ref = fft(a.ref, dim0);
res.set(ref);
}
public static void fft2(Array res, Array a) throws Exception {
long ref = fft2(a.ref, 0, 0);
res.set(ref);
}
public static void fft2(Array res, Array a, int dim0, int dim1) throws Exception {
long ref = fft2(a.ref, dim0, dim1);
res.set(ref);
}
public static void fft3(Array res, Array a) throws Exception {
long ref = fft3(a.ref, 0, 0, 0);
res.set(ref);
}
public static void fft3(Array res, Array a, int dim0, int dim1, int dim2) throws Exception {
long ref = fft3(a.ref, dim0, dim1, dim2);
res.set(ref);
}
public static void ifft(Array res, Array a) throws Exception {
long ref = ifft(a.ref, 0);
res.set(ref);
}
public static void ifft(Array res, Array a, int dim0) throws Exception {
long ref = ifft(a.ref, dim0);
res.set(ref);
}
public static void ifft2(Array res, Array a) throws Exception {
long ref = ifft2(a.ref, 0, 0);
res.set(ref);
}
public static void ifft2(Array res, Array a, int dim0, int dim1) throws Exception {
long ref = ifft2(a.ref, dim0, dim1);
res.set(ref);
}
public static void ifft3(Array res, Array a) throws Exception {
long ref = ifft3(a.ref, 0, 0, 0);
res.set(ref);
}
public static void ifft3(Array res, Array a, int dim0, int dim1, int dim2) throws Exception {
long ref = ifft3(a.ref, dim0, dim1, dim2);
res.set(ref);
}
public static void convolve1(Array res, Array a, Array b) throws Exception {
long ref = convolve1(a.ref, b.ref, 0);
res.set(ref);
}
public static void convolve2(Array res, Array a, Array b) throws Exception {
long ref = convolve2(a.ref, b.ref, 0);
res.set(ref);
}
public static void convolve3(Array res, Array a, Array b) throws Exception {
long ref = convolve3(a.ref, b.ref, 0);
res.set(ref);
}
}