@@ -3,7 +3,7 @@ module TestUtils
3
3
import .. AbstractFFTs
4
4
5
5
"""
6
- TestUtils.test_complex_ffts(ArrayType=Array; test_inplace=true, test_adjoint=true)
6
+ TestUtils.test_complex_ffts(ArrayType=Array; test_inplace=true, test_adjoint=true, test_wrappers=true )
7
7
8
8
Run tests to verify correctness of FFT, BFFT, and IFFT functionality using a particular backend plan implementation.
9
9
The backend implementation is assumed to be loaded prior to calling this function.
@@ -15,11 +15,12 @@ The backend implementation is assumed to be loaded prior to calling this functio
15
15
`convert(ArrayType, ...)`.
16
16
- `test_inplace=true`: whether to test in-place plans.
17
17
- `test_adjoint=true`: whether to test [plan adjoints](api.md#Base.adjoint).
18
+ - `test_wrappers=true`: whether to test any wrapper array inputs such as views.
18
19
"""
19
20
function test_complex_ffts end
20
21
21
22
"""
22
- TestUtils.test_real_ffts(ArrayType=Array; test_adjoint=true, copy_input=false)
23
+ TestUtils.test_real_ffts(ArrayType=Array; test_adjoint=true, copy_input=false, test_wrappers=true )
23
24
24
25
Run tests to verify correctness of RFFT, BRFFT, and IRFFT functionality using a particular backend plan implementation.
25
26
The backend implementation is assumed to be loaded prior to calling this function.
@@ -32,18 +33,21 @@ The backend implementation is assumed to be loaded prior to calling this functio
32
33
- `test_adjoint=true`: whether to test [plan adjoints](api.md#Base.adjoint).
33
34
- `copy_input=false`: whether to copy the input before applying the plan in tests, to accomodate for
34
35
[input-mutating behaviour of real FFTW plans](https://github.com/JuliaMath/AbstractFFTs.jl/issues/101).
36
+ - `test_wrappers=true`: whether to test any wrapper array inputs such as views.
35
37
"""
36
38
function test_real_ffts end
37
39
38
40
# Always copy input before application due to FFTW real plans possibly mutating input (AbstractFFTs.jl#101)
39
41
"""
40
42
TestUtils.test_plan(P::Plan, x::AbstractArray, x_transformed::AbstractArray;
41
- inplace_plan=false, copy_input=false)
43
+ inplace_plan=false, copy_input=false, test_wrappers=true )
42
44
43
45
Test basic properties of a plan `P` given an input array `x` and expected output `x_transformed`.
44
46
45
47
Because [real FFTW plans may mutate their input in some cases](https://github.com/JuliaMath/AbstractFFTs.jl/issues/101),
46
48
we allow specifying `copy_input=true` to allow for this behaviour in tests by copying the input before applying the plan.
49
+ We also allow specifying `test_wrappers=false` to skip testing wrapper array inputs such as views, which may cause ambiguity
50
+ issues for some array types currently.
47
51
"""
48
52
function test_plan end
49
53
@@ -57,6 +61,8 @@ Real-to-complex and complex-to-real plans require a slightly modified dot test,
57
61
The plan is assumed out-of-place, as adjoints are not yet supported for in-place plans.
58
62
Because [real FFTW plans may mutate their input in some cases](https://github.com/JuliaMath/AbstractFFTs.jl/issues/101),
59
63
we allow specifying `copy_input=true` to allow for this behaviour in tests by copying the input before applying the plan.
64
+ We also allow specifying `test_wrappers=false` to skip testing wrapper array inputs such as views, which may cause ambiguity
65
+ issues for some array types currently.
60
66
"""
61
67
function test_plan_adjoint end
62
68
0 commit comments