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
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ITensors"
uuid = "9136182c-28ba-11e9-034c-db9fb085ebd5"
authors = ["Matthew Fishman <[email protected]>", "Miles Stoudenmire <[email protected]>"]
version = "0.9.4"
version = "0.9.5"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
6 changes: 3 additions & 3 deletions src/itensor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,16 @@ ITensor(::AliasStyle, args...; kwargs...)::ITensor = error(
Create a `Tensor` that stores a copy of the storage and
indices of the input `ITensor`.
"""
Tensor(T::ITensor)::Tensor = Tensor(NeverAlias(), T)
Tensor(as::NeverAlias, T::ITensor)::Tensor = Tensor(AllowAlias(), copy(T))
NDTensors.Tensor(T::ITensor)::Tensor = Tensor(NeverAlias(), T)
NDTensors.Tensor(as::NeverAlias, T::ITensor)::Tensor = Tensor(AllowAlias(), copy(T))

"""
tensor(::ITensor)

Convert the `ITensor` to a `Tensor` that shares the same
storage and indices as the `ITensor`.
"""
Tensor(::AllowAlias, A::ITensor) = A.tensor
NDTensors.Tensor(::AllowAlias, A::ITensor) = A.tensor

"""
ITensor([::Type{ElT} = Float64, ]inds)
Expand Down
3 changes: 1 addition & 2 deletions test/threading/test_threading.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using Compat
using ITensors
using Test
using LinearAlgebra
Expand All @@ -8,7 +7,7 @@ if isone(Threads.nthreads())
end

@testset "Threading" begin
blas_num_threads = Compat.get_num_threads()
blas_num_threads = BLAS.get_num_threads()
strided_num_threads = ITensors.NDTensors.Strided.get_num_threads()

BLAS.set_num_threads(1)
Expand Down