Skip to content

Commit

Permalink
Merge pull request #16 from putianyi889/version-0.0.3.3
Browse files Browse the repository at this point in the history
use EltypeExtensions
  • Loading branch information
putianyi889 authored Mar 3, 2024
2 parents b50ba44 + 625d4a0 commit 8eed4b5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 135 deletions.
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ version = "0.0.3"
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
BandedMatrices = "aae01518-5342-5314-be14-df237901396f"
CircularArrays = "7a955b69-7140-5f4e-a0ed-f168c5e2e749"
EltypeExtensions = "583f92f5-06d6-4306-8236-316410defc98"
Infinities = "e1ba4f0e-776d-440f-acd9-e1d2e9742647"
LazyArrays = "5078a376-72f3-5289-bfd5-ec5146d43c02"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand All @@ -19,6 +20,7 @@ BandedMatrices = "0.15, 0.16, 0.17, 1"
CircularArrays = "1"
ClassicalOrthogonalPolynomials = "0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.10, 0.11, 0.12"
Documenter = "0.19, 0.20, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 1"
EltypeExtensions = "0.0.2"
InfiniteArrays = "0.10, 0.11, 0.12, 0.13"
Infinities = "0.1"
LazyArrays = "0.19, 0.20, 0.21, 0.22, 1"
Expand Down
129 changes: 0 additions & 129 deletions src/EltypeExtensions.jl

This file was deleted.

5 changes: 3 additions & 2 deletions src/PseudostableRecurrences.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module PseudostableRecurrences

# Write your package code here.
using EltypeExtensions
using EltypeExtensions: _to_precisiontype

include("Utils.jl")
include("CircularArraysExt.jl")
Expand All @@ -11,7 +12,7 @@ include("StencilRecurrences.jl")
include("BandedSylvesters.jl")

import LinearAlgebra: norm
export stable_recurrence
export stable_recurrence, precision_shift

"""
precision_shift(P::AbstractLinearRecurrencePlan)
Expand Down
11 changes: 7 additions & 4 deletions src/Utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,18 @@ iscircular(A::AbstractArray) = iscircular(parent(A))
tocircular(A::AbstractArray) = iscircular(A) ? A : CircularArray(A)

# not to be confused with LinearAlgebra.BLAS.dotu
_dotu(x, y) = mapreduce(*, +, x, y)
"""
_dotu(x, y) = mapreduce(*, +, x, y)
include("EltypeExtensions.jl")
Not to be confused with LinearAlgebra.BLAS.dotu. See [https://github.com/JuliaLang/julia/pull/27677](https://github.com/JuliaLang/julia/pull/27677)
"""
_dotu(x, y) = mapreduce(*, +, x, y)

"""
ToPrecision{F}(f::F) <: Function
Create a function where the first argument specifies the returned [`precisiontype`](@ref):
(f::ToPrecision)(T, args...) = to_precision(T, f.f(args...))
Create a function where the first argument specifies the returned `precisiontype`:
(f::ToPrecision)(T, args...) = precisionconvert(precisiontype(T), f.f(args...))
# Examples
```jldoctest; setup = :(import PseudostableRecurrences: ToPrecision)
Expand Down

0 comments on commit 8eed4b5

Please sign in to comment.