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