From 0405374ed3d96a2a48a3c32174e71940fe394c7b Mon Sep 17 00:00:00 2001 From: Martin Holters Date: Mon, 28 Oct 2024 14:14:46 +0100 Subject: [PATCH] Add StaticArrays support for conv --- Project.toml | 2 ++ ext/StaticArraysExt.jl | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 ext/StaticArraysExt.jl diff --git a/Project.toml b/Project.toml index c8b80f1c..89e82caa 100644 --- a/Project.toml +++ b/Project.toml @@ -16,9 +16,11 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" [weakdeps] OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" +StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" [extensions] OffsetArraysExt = "OffsetArrays" +StaticArraysExt = "StaticArrays" [compat] Bessels = "0.2" diff --git a/ext/StaticArraysExt.jl b/ext/StaticArraysExt.jl new file mode 100644 index 00000000..20b82dcb --- /dev/null +++ b/ext/StaticArraysExt.jl @@ -0,0 +1,10 @@ +module StaticArraysExt +import DSP +import StaticArrays + +DSP.conv_with_offset(::StaticArrays.SOneTo) = false + +DSP.conv_output_axis(::StaticArrays.SOneTo{M}, ::StaticArrays.SOneTo{N}) where {M, N} = + StaticArrays.SOneTo{M + N - 1}() + +end