Skip to content

Commit

Permalink
Fix type stability when using Float32 (#22)
Browse files Browse the repository at this point in the history
* fix `eps` types

* bump version
  • Loading branch information
lpawela authored Jul 3, 2024
1 parent 9cc01fa commit ad66926
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SpinGlassTensors"
uuid = "7584fc6a-5a23-4eeb-8277-827aab0146ea"
authors = ["Anna Maria Dziubyna <[email protected]>", "Tomasz Śmierzchalski <[email protected]>", "Bartłomiej Gardas <[email protected]>", "Konrad Jałowiecki <[email protected]>", "Łukasz Pawela <[email protected]>", "Marek M. Rams <[email protected]>"]
version = "1.1.1"
version = "1.1.2"

[deps]
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
Expand Down
4 changes: 2 additions & 2 deletions src/linear_algebra_ext.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ end
function qr_fact(
M::AbstractMatrix{T},
Dcut::Int = typemax(Int),
tol::T = eps();
tol::T = eps(T);
toGPU::Bool = true,
kwargs...,
) where {T<:Real}
Expand All @@ -44,7 +44,7 @@ end
function rq_fact(
M::AbstractMatrix{T},
Dcut::Int = typemax(Int),
tol::T = eps();
tol::T = eps(T);
toGPU::Bool = true,
kwargs...,
) where {T<:Real}
Expand Down
8 changes: 4 additions & 4 deletions src/mps/canonise.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function truncate!(
ψ::QMps{T},
s::Symbol,
Dcut::Int = typemax(Int),
tolS::T = eps();
tolS::T = eps(T);
kwargs...,
) where {T<:Real}
@assert s (:left, :right)
Expand All @@ -46,12 +46,12 @@ canonise!(ψ::QMps, ::Val{:right}) = _left_sweep!(ψ, typemax(Int))
canonise!::QMps, ::Val{:left}) = _right_sweep!(ψ, typemax(Int))

function canonise_truncate!(
ψ::QMps,
ψ::QMps{T},
type::Symbol,
Dcut::Int = typemax(Int),
tolS = eps();
tolS::T = eps(T);
kwargs...,
)
) where {T<:Real}
if type == :right
_left_sweep!(ψ, Dcut, tolS; kwargs...)
elseif type == :left
Expand Down

2 comments on commit ad66926

@lpawela
Copy link
Member Author

@lpawela lpawela commented on ad66926 Jul 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/110356

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.1.2 -m "<description of version>" ad669267c8a777f1ea7e5c2c0e0ec753a5cd5f46
git push origin v1.1.2

Please sign in to comment.