Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ext/LinearOperatorFFTWExt/DCTOp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ returns a `DCTOpImpl <: AbstractLinearOperator` which performs a DCT on a given
* `shape::Tuple` - size of the array to transform
* `dcttype` - type of DCT (currently `2` and `4` are supported)
"""
function LinearOperatorCollection.DCTOp(T::Type; shape::Tuple, dcttype=2)
function LinearOperatorCollection.DCTOp(T::Type; shape::Tuple, S = Array{T}, dcttype=2)

tmp=Array{T}(undef, shape)
tmp=similar(S(undef, 0), shape...)
if dcttype == 2
plan = plan_dct!(tmp)
iplan = plan_idct!(tmp)
Expand Down
4 changes: 2 additions & 2 deletions ext/LinearOperatorFFTWExt/DSTOp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ returns a `LinearOperator` which performs a DST on a given input array.
* `T::Type` - type of the array to transform
* `shape::Tuple` - size of the array to transform
"""
function LinearOperatorCollection.DSTOp(T::Type; shape::Tuple)
tmp=Array{T}(undef, shape)
function LinearOperatorCollection.DSTOp(T::Type; shape::Tuple, S = Array{T})
tmp=similar(S(undef, 0), shape...)

plan = FFTW.plan_r2r!(tmp,FFTW.RODFT10)
iplan = FFTW.plan_r2r!(tmp,FFTW.RODFT01)
Expand Down
Loading