Skip to content

Commit 074cded

Browse files
authored
Merge branch 'master' into update-conda-forge-recipe
2 parents c399290 + ed67c10 commit 074cded

6 files changed

Lines changed: 283 additions & 180 deletions

File tree

.clang-format

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
BasedOnStyle: LLVM
2+
3+
AccessModifierOffset: -4
4+
5+
AlignConsecutiveMacros: true
6+
AlignConsecutiveBitFields: true
7+
AlignEscapedNewlines: Right
8+
9+
AllowAllParametersOfDeclarationOnNextLine: false
10+
AllowShortBlocksOnASingleLine: Empty
11+
12+
AlwaysBreakTemplateDeclarations: Yes
13+
14+
BinPackParameters: false
15+
16+
BraceWrapping:
17+
AfterCaseLabel: true
18+
AfterClass: true
19+
AfterControlStatement: Never
20+
AfterEnum: true
21+
AfterFunction: true
22+
AfterNamespace: true
23+
AfterObjCDeclaration: false
24+
AfterStruct: true
25+
AfterUnion: true
26+
AfterExternBlock: true
27+
BeforeCatch: false
28+
BeforeElse: true
29+
BeforeLambdaBody: false
30+
BeforeWhile: false
31+
IndentBraces: false
32+
SplitEmptyFunction: true
33+
SplitEmptyRecord: true
34+
SplitEmptyNamespace: true
35+
BreakBeforeBraces: Custom
36+
37+
ColumnLimit: 80
38+
39+
IndentWidth: 4
40+
IndentWrappedFunctionNames: true

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@
55

66
# Add cython-lint to pre-commit config
77
5df98187dda56f6d340f0824570fe5080d0b4f05
8+
9+
# Move from clang-format-15 to clang-format-22
10+
ffe413c18571422f4b974e780ea19f83f1f776bf

.github/workflows/pre-commit.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,5 @@ jobs:
3030
codespell
3131
pylint
3232
33-
- name: Set up clang-format
34-
run: |
35-
sudo apt-get install -y clang-format-15
36-
sudo unlink /usr/bin/clang-format
37-
sudo ln -s /usr/bin/clang-format-15 /usr/bin/clang-format
38-
clang-format --version
39-
4033
- name: Run pre-commit checks
4134
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ repos:
5151
- id: black
5252
exclude: "_vendored/conv_template.py"
5353

54-
- repo: https://github.com/pocc/pre-commit-hooks
55-
rev: v1.3.5
54+
- repo: https://github.com/pre-commit/mirrors-clang-format
55+
rev: v22.1.0
5656
hooks:
5757
- id: clang-format
5858
args: ["-i"]

mkl_fft/src/mklfft.h

Lines changed: 119 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -27,96 +27,153 @@
2727
#include "mkl.h"
2828
#include "numpy/arrayobject.h"
2929

30-
typedef struct DftiCache {
31-
DFTI_DESCRIPTOR_HANDLE hand;
32-
int initialized;
30+
typedef struct DftiCache
31+
{
32+
DFTI_DESCRIPTOR_HANDLE hand;
33+
int initialized;
3334
} DftiCache;
3435

3536
extern int _free_dfti_cache(DftiCache *);
3637

3738
/* Complex input, in-place */
38-
extern int cdouble_mkl_fft1d_in(PyArrayObject *, npy_intp, int, double,
39-
DftiCache *);
40-
extern int cfloat_mkl_fft1d_in(PyArrayObject *, npy_intp, int, double,
41-
DftiCache *);
42-
extern int cdouble_mkl_ifft1d_in(PyArrayObject *, npy_intp, int, double,
43-
DftiCache *);
44-
extern int cfloat_mkl_ifft1d_in(PyArrayObject *, npy_intp, int, double,
45-
DftiCache *);
39+
extern int
40+
cdouble_mkl_fft1d_in(PyArrayObject *, npy_intp, int, double, DftiCache *);
41+
extern int
42+
cfloat_mkl_fft1d_in(PyArrayObject *, npy_intp, int, double, DftiCache *);
43+
extern int
44+
cdouble_mkl_ifft1d_in(PyArrayObject *, npy_intp, int, double, DftiCache *);
45+
extern int
46+
cfloat_mkl_ifft1d_in(PyArrayObject *, npy_intp, int, double, DftiCache *);
4647

4748
/* Complex input/output, out-of-place */
48-
extern int cfloat_cfloat_mkl_fft1d_out(PyArrayObject *, npy_intp, int,
49-
PyArrayObject *, double, DftiCache *);
50-
extern int cdouble_cdouble_mkl_fft1d_out(PyArrayObject *, npy_intp, int,
51-
PyArrayObject *, double, DftiCache *);
52-
extern int cfloat_cfloat_mkl_ifft1d_out(PyArrayObject *, npy_intp, int,
53-
PyArrayObject *, double, DftiCache *);
54-
extern int cdouble_cdouble_mkl_ifft1d_out(PyArrayObject *, npy_intp, int,
55-
PyArrayObject *, double, DftiCache *);
49+
extern int cfloat_cfloat_mkl_fft1d_out(PyArrayObject *,
50+
npy_intp,
51+
int,
52+
PyArrayObject *,
53+
double,
54+
DftiCache *);
55+
extern int cdouble_cdouble_mkl_fft1d_out(PyArrayObject *,
56+
npy_intp,
57+
int,
58+
PyArrayObject *,
59+
double,
60+
DftiCache *);
61+
extern int cfloat_cfloat_mkl_ifft1d_out(PyArrayObject *,
62+
npy_intp,
63+
int,
64+
PyArrayObject *,
65+
double,
66+
DftiCache *);
67+
extern int cdouble_cdouble_mkl_ifft1d_out(PyArrayObject *,
68+
npy_intp,
69+
int,
70+
PyArrayObject *,
71+
double,
72+
DftiCache *);
5673

5774
/* Real input, complex output, out-of-place */
58-
extern int float_cfloat_mkl_fft1d_out(PyArrayObject *, npy_intp, int,
59-
PyArrayObject *, int, double,
75+
extern int float_cfloat_mkl_fft1d_out(PyArrayObject *,
76+
npy_intp,
77+
int,
78+
PyArrayObject *,
79+
int,
80+
double,
6081
DftiCache *);
61-
extern int double_cdouble_mkl_fft1d_out(PyArrayObject *, npy_intp, int,
62-
PyArrayObject *, int, double,
82+
extern int double_cdouble_mkl_fft1d_out(PyArrayObject *,
83+
npy_intp,
84+
int,
85+
PyArrayObject *,
86+
int,
87+
double,
6388
DftiCache *);
64-
extern int float_cfloat_mkl_ifft1d_out(PyArrayObject *, npy_intp, int,
65-
PyArrayObject *, int, double,
89+
extern int float_cfloat_mkl_ifft1d_out(PyArrayObject *,
90+
npy_intp,
91+
int,
92+
PyArrayObject *,
93+
int,
94+
double,
6695
DftiCache *);
67-
extern int double_cdouble_mkl_ifft1d_out(PyArrayObject *, npy_intp, int,
68-
PyArrayObject *, int, double,
96+
extern int double_cdouble_mkl_ifft1d_out(PyArrayObject *,
97+
npy_intp,
98+
int,
99+
PyArrayObject *,
100+
int,
101+
double,
69102
DftiCache *);
70103

71104
/* Real input, real output, in-place */
72-
extern int float_mkl_rfft_in(PyArrayObject *, npy_intp, int, double,
73-
DftiCache *);
74-
extern int float_mkl_irfft_in(PyArrayObject *, npy_intp, int, double,
75-
DftiCache *);
105+
extern int
106+
float_mkl_rfft_in(PyArrayObject *, npy_intp, int, double, DftiCache *);
107+
extern int
108+
float_mkl_irfft_in(PyArrayObject *, npy_intp, int, double, DftiCache *);
76109

77-
extern int double_mkl_rfft_in(PyArrayObject *, npy_intp, int, double,
78-
DftiCache *);
79-
extern int double_mkl_irfft_in(PyArrayObject *, npy_intp, int, double,
80-
DftiCache *);
110+
extern int
111+
double_mkl_rfft_in(PyArrayObject *, npy_intp, int, double, DftiCache *);
112+
extern int
113+
double_mkl_irfft_in(PyArrayObject *, npy_intp, int, double, DftiCache *);
81114

82115
/* Real input, real output, out-of-place */
83-
extern int float_float_mkl_rfft_out(PyArrayObject *, npy_intp, int,
84-
PyArrayObject *, double, DftiCache *);
85-
extern int float_float_mkl_irfft_out(PyArrayObject *, npy_intp, int,
86-
PyArrayObject *, double, DftiCache *);
87-
88-
extern int double_double_mkl_rfft_out(PyArrayObject *, npy_intp, int,
89-
PyArrayObject *, double, DftiCache *);
90-
extern int double_double_mkl_irfft_out(PyArrayObject *, npy_intp, int,
91-
PyArrayObject *, double, DftiCache *);
116+
extern int float_float_mkl_rfft_out(PyArrayObject *,
117+
npy_intp,
118+
int,
119+
PyArrayObject *,
120+
double,
121+
DftiCache *);
122+
extern int float_float_mkl_irfft_out(PyArrayObject *,
123+
npy_intp,
124+
int,
125+
PyArrayObject *,
126+
double,
127+
DftiCache *);
128+
129+
extern int double_double_mkl_rfft_out(PyArrayObject *,
130+
npy_intp,
131+
int,
132+
PyArrayObject *,
133+
double,
134+
DftiCache *);
135+
extern int double_double_mkl_irfft_out(PyArrayObject *,
136+
npy_intp,
137+
int,
138+
PyArrayObject *,
139+
double,
140+
DftiCache *);
92141

93142
/* Complex input. real output, out-of-place */
94-
extern int cdouble_double_mkl_irfft_out(PyArrayObject *, npy_intp, int,
95-
PyArrayObject *, double, DftiCache *);
96-
extern int cfloat_float_mkl_irfft_out(PyArrayObject *, npy_intp, int,
97-
PyArrayObject *, double, DftiCache *);
143+
extern int cdouble_double_mkl_irfft_out(PyArrayObject *,
144+
npy_intp,
145+
int,
146+
PyArrayObject *,
147+
double,
148+
DftiCache *);
149+
extern int cfloat_float_mkl_irfft_out(PyArrayObject *,
150+
npy_intp,
151+
int,
152+
PyArrayObject *,
153+
double,
154+
DftiCache *);
98155

99156
/* Complex, ND, in-place */
100157
extern int cdouble_cdouble_mkl_fftnd_in(PyArrayObject *, double);
101158
extern int cdouble_cdouble_mkl_ifftnd_in(PyArrayObject *, double);
102159
extern int cfloat_cfloat_mkl_fftnd_in(PyArrayObject *, double);
103160
extern int cfloat_cfloat_mkl_ifftnd_in(PyArrayObject *, double);
104161

105-
extern int cdouble_cdouble_mkl_fftnd_out(PyArrayObject *, PyArrayObject *,
106-
double);
107-
extern int cdouble_cdouble_mkl_ifftnd_out(PyArrayObject *, PyArrayObject *,
108-
double);
109-
extern int cfloat_cfloat_mkl_fftnd_out(PyArrayObject *, PyArrayObject *,
110-
double);
111-
extern int cfloat_cfloat_mkl_ifftnd_out(PyArrayObject *, PyArrayObject *,
112-
double);
162+
extern int
163+
cdouble_cdouble_mkl_fftnd_out(PyArrayObject *, PyArrayObject *, double);
164+
extern int
165+
cdouble_cdouble_mkl_ifftnd_out(PyArrayObject *, PyArrayObject *, double);
166+
extern int
167+
cfloat_cfloat_mkl_fftnd_out(PyArrayObject *, PyArrayObject *, double);
168+
extern int
169+
cfloat_cfloat_mkl_ifftnd_out(PyArrayObject *, PyArrayObject *, double);
113170

114171
extern int float_cfloat_mkl_fftnd_out(PyArrayObject *, PyArrayObject *, double);
115-
extern int float_cfloat_mkl_ifftnd_out(PyArrayObject *, PyArrayObject *,
116-
double);
117-
extern int double_cdouble_mkl_fftnd_out(PyArrayObject *, PyArrayObject *,
118-
double);
119-
extern int double_cdouble_mkl_ifftnd_out(PyArrayObject *, PyArrayObject *,
120-
double);
172+
extern int
173+
float_cfloat_mkl_ifftnd_out(PyArrayObject *, PyArrayObject *, double);
174+
extern int
175+
double_cdouble_mkl_fftnd_out(PyArrayObject *, PyArrayObject *, double);
176+
extern int
177+
double_cdouble_mkl_ifftnd_out(PyArrayObject *, PyArrayObject *, double);
121178

122179
extern char *mkl_dfti_error(MKL_LONG);

0 commit comments

Comments
 (0)